aboutsummaryrefslogtreecommitdiffstats
path: root/dex/protocol_test.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-11-26 17:58:02 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:19 +0800
commita0adfadd8aa2f471a76dd35622b49bb83e67bf6c (patch)
tree5b459e29327ab521ff4c1fbcd54500431a2a0456 /dex/protocol_test.go
parent5791965d8af0b1d8d30ae7232879d063cb5cd8f0 (diff)
downloadgo-tangerine-a0adfadd8aa2f471a76dd35622b49bb83e67bf6c.tar.gz
go-tangerine-a0adfadd8aa2f471a76dd35622b49bb83e67bf6c.tar.zst
go-tangerine-a0adfadd8aa2f471a76dd35622b49bb83e67bf6c.zip
dex: fix tests
Diffstat (limited to 'dex/protocol_test.go')
-rw-r--r--dex/protocol_test.go56
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",