diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-11-26 17:58:02 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:54 +0800 |
commit | 91e02be28118b217d19fabe65cc01992e8837973 (patch) | |
tree | 90e37f0174e2281e688e293f3a123b83e0caa49a /dex/protocol_test.go | |
parent | 2ea3e5bc1881de55b6c4a9fe77d735257536d068 (diff) | |
download | dexon-91e02be28118b217d19fabe65cc01992e8837973.tar dexon-91e02be28118b217d19fabe65cc01992e8837973.tar.gz dexon-91e02be28118b217d19fabe65cc01992e8837973.tar.bz2 dexon-91e02be28118b217d19fabe65cc01992e8837973.tar.lz dexon-91e02be28118b217d19fabe65cc01992e8837973.tar.xz dexon-91e02be28118b217d19fabe65cc01992e8837973.tar.zst dexon-91e02be28118b217d19fabe65cc01992e8837973.zip |
dex: fix tests
Diffstat (limited to 'dex/protocol_test.go')
-rw-r--r-- | dex/protocol_test.go | 56 |
1 files changed, 32 insertions, 24 deletions
diff --git a/dex/protocol_test.go b/dex/protocol_test.go index 64d7fa3e7..c2f9c00b2 100644 --- a/dex/protocol_test.go +++ b/dex/protocol_test.go @@ -433,12 +433,14 @@ func TestRecvVote(t *testing.T) { defer p.close() vote := coreTypes.Vote{ - ProposerID: coreTypes.NodeID{coreCommon.Hash{1, 2, 3}}, - Period: 10, - Position: coreTypes.Position{ - ChainID: 11, - Round: 12, - Height: 13, + VoteHeader: coreTypes.VoteHeader{ + ProposerID: coreTypes.NodeID{coreCommon.Hash{1, 2, 3}}, + Period: 10, + Position: coreTypes.Position{ + ChainID: 11, + Round: 12, + Height: 13, + }, }, Signature: coreCrypto.Signature{ Type: "123", @@ -468,12 +470,14 @@ func TestSendVote(t *testing.T) { defer pm.Stop() vote := coreTypes.Vote{ - ProposerID: coreTypes.NodeID{coreCommon.Hash{1, 2, 3}}, - Period: 10, - Position: coreTypes.Position{ - ChainID: 1, - Round: 10, - Height: 13, + VoteHeader: coreTypes.VoteHeader{ + ProposerID: coreTypes.NodeID{coreCommon.Hash{1, 2, 3}}, + Period: 10, + Position: coreTypes.Position{ + ChainID: 1, + Round: 10, + Height: 13, + }, }, Signature: coreCrypto.Signature{ Type: "123", @@ -663,12 +667,14 @@ func TestRecvAgreement(t *testing.T) { // TODO(sonic): polish this vote := coreTypes.Vote{ - ProposerID: coreTypes.NodeID{coreCommon.Hash{1, 2, 3}}, - Period: 10, - Position: coreTypes.Position{ - ChainID: 1, - Round: 10, - Height: 13, + VoteHeader: coreTypes.VoteHeader{ + ProposerID: coreTypes.NodeID{coreCommon.Hash{1, 2, 3}}, + Period: 10, + Position: coreTypes.Position{ + ChainID: 1, + Round: 10, + Height: 13, + }, }, Signature: coreCrypto.Signature{ Type: "123", @@ -706,12 +712,14 @@ func TestSendAgreement(t *testing.T) { // TODO(sonic): polish this vote := coreTypes.Vote{ - ProposerID: coreTypes.NodeID{coreCommon.Hash{1, 2, 3}}, - Period: 10, - Position: coreTypes.Position{ - ChainID: 1, - Round: 10, - Height: 13, + VoteHeader: coreTypes.VoteHeader{ + ProposerID: coreTypes.NodeID{coreCommon.Hash{1, 2, 3}}, + Period: 10, + Position: coreTypes.Position{ + ChainID: 1, + Round: 10, + Height: 13, + }, }, Signature: coreCrypto.Signature{ Type: "123", |