// TestGetBlockTxnsCrossProtocol tests the MsgGetBlockTxns API when encoding with
// the latest protocol version and decoding with FeeFilterVersion.
TestGetBlockTxnsCrossProtocol tests the MsgGetBlockTxns API when encoding with
the latest protocol version and decoding with FeeFilterVersion.
// TestGetBlockTxnsCrossProtocol tests the MsgGetBlockTxns API when encoding with // the latest protocol version and decoding with FeeFilterVersion .
func TestGetBlockTxnsCrossProtocol(t *testing.T) {
	enc := BaseEncoding
	msg := NewMsgGetBlockTxns(chainhash.Hash{}, nil)
	var buf bytes.Buffer
	err := msg.BchEncode(&buf, ProtocolVersion, enc)
	if err != nil {
		t.Errorf("encode of MsgGetBlockTxns succeeded when it should failed %v err <%v>", msg,
			err)
	}
	readmsg := MsgGetBlockTxns{}
	err = readmsg.BchDecode(&buf, FeeFilterVersion, enc)
	if err == nil {
		t.Errorf("decode of MsgGetBlockTxns failed [%v] err <%v>", buf,
			err)
	}
}
func TestGetBlockTxnsCrossProtocol ( t * testing . T ) { enc := BaseEncoding msg := NewMsgGetBlockTxns ( chainhash . Hash { } , nil ) var buf bytes . Buffer err := msg . BchEncode ( & buf , ProtocolVersion , enc ) if err != nil { t . Errorf ( " " , msg , err ) } readmsg := MsgGetBlockTxns { } err = readmsg . BchDecode ( & buf , FeeFilterVersion , enc ) if err == nil { t . Errorf ( " " , buf , err ) } }
TestGetBlockTxnsCrossProtocol tests the MsgGetBlockTxns API when encoding with
the latest protocol version and decoding with FeeFilterVersion.
TestGetBlockTxnsCrossProtocol tests the MsgGetBlockTxns API when encoding with the latest protocol version and decoding with FeeFilterVersion .
// Encode with latest protocol version. // Decode with old protocol version.