payload: drop Network from Extensible
It's only used to sign/verify it and is not a part of the structure. It's still neded in consensus.Payload though because that's the way dbft library is.
This commit is contained in:
parent
95c279325a
commit
f91ff78918
10 changed files with 18 additions and 76 deletions
|
@ -79,7 +79,7 @@ func TestConsensusPayload_Setters(t *testing.T) {
|
|||
func TestConsensusPayload_Serializable(t *testing.T) {
|
||||
for _, mt := range messageTypes {
|
||||
p := randomPayload(t, mt)
|
||||
actual := &Payload{Extensible: npayload.Extensible{Network: netmode.UnitTestNet}}
|
||||
actual := &Payload{Extensible: npayload.Extensible{}, network: netmode.UnitTestNet}
|
||||
data, err := testserdes.EncodeBinary(p)
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, testserdes.DecodeBinary(data, &actual.Extensible))
|
||||
|
@ -158,12 +158,12 @@ func randomPayload(t *testing.T, mt messageType) *Payload {
|
|||
payload: randomMessage(t, mt),
|
||||
},
|
||||
Extensible: npayload.Extensible{
|
||||
Network: netmode.UnitTestNet,
|
||||
Witness: transaction.Witness{
|
||||
InvocationScript: random.Bytes(3),
|
||||
VerificationScript: []byte{byte(opcode.PUSH0)},
|
||||
},
|
||||
},
|
||||
network: netmode.UnitTestNet,
|
||||
}
|
||||
|
||||
if mt == changeViewType {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue