types: []byte -> data.Bytes

This commit is contained in:
Ethan Buchman
2017-04-27 19:01:18 -04:00
parent 1310c72647
commit bdb34f9f4e
9 changed files with 60 additions and 49 deletions

View File

@ -60,9 +60,9 @@ func TestValidTxProof(t *testing.T) {
proof := txs.Proof(i)
assert.Equal(i, proof.Index, "%d: %d", h, i)
assert.Equal(len(txs), proof.Total, "%d: %d", h, i)
assert.Equal(root, proof.RootHash, "%d: %d", h, i)
assert.Equal(leaf, proof.Data, "%d: %d", h, i)
assert.Equal(leafHash, proof.LeafHash(), "%d: %d", h, i)
assert.EqualValues(root, proof.RootHash, "%d: %d", h, i)
assert.EqualValues(leaf, proof.Data, "%d: %d", h, i)
assert.EqualValues(leafHash, proof.LeafHash(), "%d: %d", h, i)
assert.Nil(proof.Validate(root), "%d: %d", h, i)
assert.NotNil(proof.Validate([]byte("foobar")), "%d: %d", h, i)