diff options
author | Felix Lange <fjl@twurst.com> | 2015-02-05 10:07:18 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-02-06 07:00:36 +0800 |
commit | 739066ec56393e63b93531787746fb8ba5f1df15 (patch) | |
tree | 6826ff78a688745e7b01044b06b82af9ea51b6e2 /p2p/discover/table_test.go | |
parent | 12224c7f5924720767d73f06ed4571dc3ce2f092 (diff) | |
download | dexon-739066ec56393e63b93531787746fb8ba5f1df15.tar.gz dexon-739066ec56393e63b93531787746fb8ba5f1df15.tar.zst dexon-739066ec56393e63b93531787746fb8ba5f1df15.zip |
p2p/discover: add some helper functions
Diffstat (limited to 'p2p/discover/table_test.go')
-rw-r--r-- | p2p/discover/table_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/p2p/discover/table_test.go b/p2p/discover/table_test.go index 88563fe65..90f89b147 100644 --- a/p2p/discover/table_test.go +++ b/p2p/discover/table_test.go @@ -22,8 +22,8 @@ var ( func TestHexID(t *testing.T) { ref := NodeID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 106, 217, 182, 31, 165, 174, 1, 67, 7, 235, 220, 150, 66, 83, 173, 205, 159, 44, 10, 57, 42, 161, 26, 188} - id1 := HexID("0x000000000000000000000000000000000000000000000000000000000000000000000000000000806ad9b61fa5ae014307ebdc964253adcd9f2c0a392aa11abc") - id2 := HexID("000000000000000000000000000000000000000000000000000000000000000000000000000000806ad9b61fa5ae014307ebdc964253adcd9f2c0a392aa11abc") + id1 := MustHexID("0x000000000000000000000000000000000000000000000000000000000000000000000000000000806ad9b61fa5ae014307ebdc964253adcd9f2c0a392aa11abc") + id2 := MustHexID("000000000000000000000000000000000000000000000000000000000000000000000000000000806ad9b61fa5ae014307ebdc964253adcd9f2c0a392aa11abc") if id1 != ref { t.Errorf("wrong id1\ngot %v\nwant %v", id1[:], ref[:]) @@ -41,7 +41,7 @@ func TestNodeID_recover(t *testing.T) { t.Fatalf("signing error: %v", err) } - pub := newNodeID(prv) + pub := PubkeyID(&prv.PublicKey) recpub, err := recoverNodeID(hash, sig) if err != nil { t.Fatalf("recovery error: %v", err) |