(t *testing.T)
| 25 | ) |
| 26 | |
| 27 | func TestMarshalHashAccountStable(t *testing.T) { |
| 28 | v := Account{ |
| 29 | Address: proto.AccountAddress{0x10}, |
| 30 | TokenBalance: [SupportTokenNumber]uint64{10, 10}, |
| 31 | Rating: 1110, |
| 32 | NextNonce: 1, |
| 33 | } |
| 34 | bts1, err := v.MarshalHash() |
| 35 | if err != nil { |
| 36 | t.Fatal(err) |
| 37 | } |
| 38 | bts2, err := v.MarshalHash() |
| 39 | if err != nil { |
| 40 | t.Fatal(err) |
| 41 | } |
| 42 | if !bytes.Equal(bts1, bts2) { |
| 43 | t.Fatal("hash not stable") |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | func TestMarshalHashAccountStable2(t *testing.T) { |
| 48 | v1 := Account{ |
nothing calls this directly
no test coverage detected