From 5d3176b111e16ae92514c410a718e55459588db1 Mon Sep 17 00:00:00 2001 From: Michael McLoughlin Date: Sat, 13 Apr 2019 22:55:23 -0500 Subject: [PATCH] examples/stadtx: re-fork stadx code The gofumpt changes made some files *technically* not an exact fork of the original. I'm OCD about these things. --- examples/stadtx/stadtx.go | 1 + examples/stadtx/stadtx_test.go | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/stadtx/stadtx.go b/examples/stadtx/stadtx.go index 862b418..e83adf3 100644 --- a/examples/stadtx/stadtx.go +++ b/examples/stadtx/stadtx.go @@ -28,6 +28,7 @@ func scramble64(v, prime uint64) uint64 { } func SeedState(seed []uint64) State { + var state State state[0] = seed[0] ^ 0x43f6a8885a308d31 diff --git a/examples/stadtx/stadtx_test.go b/examples/stadtx/stadtx_test.go index 093a235..cccb791 100644 --- a/examples/stadtx/stadtx_test.go +++ b/examples/stadtx/stadtx_test.go @@ -2,7 +2,9 @@ package stadtx -import "testing" +import ( + "testing" +) /* @@ -37,6 +39,7 @@ int main() */ func TestHash(t *testing.T) { + var tests = []uint64{ 0x0db6608af30c8cc1, 0xe3ffb1e1a2273589, 0xc34df40f05c3d43a, 0xf79284a93cd817cf, 0x178aed7315bcd4b9, 0x48a29a42948da116, 0xa78613b72330a064, 0xa23cd23f7b6eaef7, 0x7e4c118aca1d7886, 0x37059645f8797936, 0xcb7197e3253670cb, 0x5dadeebe5a5bc19f, 0x537057981e3f75ad, 0x41d57f7870fbcbf8, 0x7fc3cd6b1bb018c2, 0xbf98dbc2a88c5050,