Merge pull request #859 from nspcc-dev/neo3/partial_consensus_message_decoding
consensus: added partial message decoding
This commit is contained in:
commit
e150bd7bb0
7 changed files with 63 additions and 17 deletions
|
@ -42,6 +42,7 @@ func TestService_GetVerified(t *testing.T) {
|
|||
hashes := []util.Uint256{txs[0].Hash(), txs[1].Hash(), txs[2].Hash()}
|
||||
|
||||
p := new(Payload)
|
||||
p.message = &message{}
|
||||
p.SetType(payload.PrepareRequestType)
|
||||
p.SetPayload(&prepareRequest{transactionHashes: hashes, minerTx: *transaction.NewMinerTXWithNonce(999)})
|
||||
p.SetValidatorIndex(1)
|
||||
|
@ -77,6 +78,7 @@ func TestService_ValidatePayload(t *testing.T) {
|
|||
srv := newTestService(t)
|
||||
priv, _ := getTestValidator(1)
|
||||
p := new(Payload)
|
||||
p.message = &message{}
|
||||
|
||||
p.SetPayload(&prepareRequest{})
|
||||
|
||||
|
@ -141,6 +143,7 @@ func TestService_OnPayload(t *testing.T) {
|
|||
|
||||
priv, _ := getTestValidator(1)
|
||||
p := new(Payload)
|
||||
p.message = &message{}
|
||||
p.SetValidatorIndex(1)
|
||||
p.SetPayload(&prepareRequest{})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue