mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-02 22:21:44 +00:00
Support nil pointers for Binary.
If the thing does not already have a typebyte declared, a fake one will be given (0x01). A TypeByte of 0x00 is reserved for nil things. No nil-dogs.
This commit is contained in:
@ -202,7 +202,7 @@ func TestReadWrite(t *testing.T) {
|
||||
// Read from buffer.
|
||||
pol2 := binary.ReadBinary(&POL{}, buf, n, err).(*POL)
|
||||
if *err != nil {
|
||||
t.Fatalf("Failed to read POL")
|
||||
t.Fatalf("Failed to read POL: %v", *err)
|
||||
}
|
||||
|
||||
// Check that validation succeeds.
|
||||
|
Reference in New Issue
Block a user