aboutsummaryrefslogtreecommitdiffstats
path: root/dex/protocol_test.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-02-27 10:41:01 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:57 +0800
commite83bcc1097d49b46b79131e546f1270b9192cc05 (patch)
treea1af659afd80e3744177637cc06b2f0662a0ced8 /dex/protocol_test.go
parent22b38ce74c3da40b7b7f24ada0abdf8d5ba03c64 (diff)
downloaddexon-e83bcc1097d49b46b79131e546f1270b9192cc05.tar.gz
dexon-e83bcc1097d49b46b79131e546f1270b9192cc05.tar.zst
dexon-e83bcc1097d49b46b79131e546f1270b9192cc05.zip
core: sync to latest core (#214)
* vendor: sync to latest core * fix for single chain
Diffstat (limited to 'dex/protocol_test.go')
-rw-r--r--dex/protocol_test.go64
1 files changed, 21 insertions, 43 deletions
diff --git a/dex/protocol_test.go b/dex/protocol_test.go
index aa06d7293..fb414613e 100644
--- a/dex/protocol_test.go
+++ b/dex/protocol_test.go
@@ -327,15 +327,11 @@ func TestRecvLatticeBlocks(t *testing.T) {
ParentHash: coreCommon.Hash{1, 1, 1, 1, 1},
Hash: coreCommon.Hash{2, 2, 2, 2, 2},
Position: coreTypes.Position{
- ChainID: 11,
- Round: 12,
- Height: 13,
+ Round: 12,
+ Height: 13,
},
Timestamp: time.Now().UTC(),
- Acks: coreCommon.NewSortedHashes(coreCommon.Hashes([]coreCommon.Hash{
- {101}, {100}, {102},
- })),
- Payload: []byte{3, 3, 3, 3, 3},
+ Payload: []byte{3, 3, 3, 3, 3},
Witness: coreTypes.Witness{
Height: 13,
Data: []byte{4, 4, 4, 4, 4},
@@ -382,15 +378,11 @@ func TestSendLatticeBlocks(t *testing.T) {
ParentHash: coreCommon.Hash{1, 1, 1, 1, 1},
Hash: coreCommon.Hash{2, 2, 2, 2, 2},
Position: coreTypes.Position{
- ChainID: 11,
- Round: 12,
- Height: 13,
+ Round: 12,
+ Height: 13,
},
Timestamp: time.Now().UTC(),
- Acks: coreCommon.NewSortedHashes(coreCommon.Hashes([]coreCommon.Hash{
- {101}, {100}, {102},
- })),
- Payload: []byte{3, 3, 3, 3, 3},
+ Payload: []byte{3, 3, 3, 3, 3},
Witness: coreTypes.Witness{
Height: 13,
Data: []byte{4, 4, 4, 4, 4},
@@ -440,9 +432,8 @@ func TestRecvVotes(t *testing.T) {
ProposerID: coreTypes.NodeID{coreCommon.Hash{1, 2, 3}},
Period: 10,
Position: coreTypes.Position{
- ChainID: 11,
- Round: 12,
- Height: 13,
+ Round: 12,
+ Height: 13,
},
},
Signature: coreCrypto.Signature{
@@ -477,9 +468,8 @@ func TestSendVotes(t *testing.T) {
ProposerID: coreTypes.NodeID{coreCommon.Hash{1, 2, 3}},
Period: 10,
Position: coreTypes.Position{
- ChainID: 1,
- Round: 10,
- Height: 13,
+ Round: 10,
+ Height: 13,
},
},
Signature: coreCrypto.Signature{
@@ -528,11 +518,7 @@ func TestSendVotes(t *testing.T) {
isReceiver bool
}{
{
- label: &peerLabel{set: notaryset, chainID: 1, round: 10},
- isReceiver: true,
- },
- {
- label: &peerLabel{set: notaryset, chainID: 1, round: 10},
+ label: &peerLabel{set: notaryset, round: 10},
isReceiver: true,
},
{
@@ -540,15 +526,11 @@ func TestSendVotes(t *testing.T) {
isReceiver: false,
},
{
- label: &peerLabel{set: notaryset, chainID: 1, round: 11},
+ label: &peerLabel{set: notaryset, round: 11},
isReceiver: false,
},
{
- label: &peerLabel{set: notaryset, chainID: 2, round: 10},
- isReceiver: false,
- },
- {
- label: &peerLabel{set: dkgset, chainID: 1, round: 10},
+ label: &peerLabel{set: dkgset, round: 10},
isReceiver: false,
},
}
@@ -678,9 +660,8 @@ func TestRecvAgreement(t *testing.T) {
ProposerID: coreTypes.NodeID{coreCommon.Hash{1, 2, 3}},
Period: 10,
Position: coreTypes.Position{
- ChainID: 1,
- Round: 10,
- Height: 13,
+ Round: 10,
+ Height: 13,
},
},
Signature: coreCrypto.Signature{
@@ -723,9 +704,8 @@ func TestSendAgreement(t *testing.T) {
ProposerID: coreTypes.NodeID{coreCommon.Hash{1, 2, 3}},
Period: 10,
Position: coreTypes.Position{
- ChainID: 1,
- Round: 10,
- Height: 13,
+ Round: 10,
+ Height: 13,
},
},
Signature: coreCrypto.Signature{
@@ -769,9 +749,8 @@ func TestRecvRandomnesses(t *testing.T) {
randomness := coreTypes.BlockRandomnessResult{
BlockHash: coreCommon.Hash{8, 8, 8},
Position: coreTypes.Position{
- ChainID: 1,
- Round: 10,
- Height: 13,
+ Round: 10,
+ Height: 13,
},
Randomness: []byte{7, 7, 7, 7},
}
@@ -802,9 +781,8 @@ func TestSendRandomnesses(t *testing.T) {
randomness := coreTypes.BlockRandomnessResult{
BlockHash: coreCommon.Hash{8, 8, 8},
Position: coreTypes.Position{
- ChainID: 1,
- Round: 10,
- Height: 13,
+ Round: 10,
+ Height: 13,
},
Randomness: []byte{7, 7, 7, 7},
}