crypto: remove crypto.Verifiable interface

We can now verify any hash.Hashable thing.
This commit is contained in:
Roman Khimov 2021-03-25 15:22:16 +03:00
parent 04e0ea2c0f
commit df12adaa9e
14 changed files with 61 additions and 28 deletions

View file

@ -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 := new(Payload)
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,6 +158,7 @@ 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)},