mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-31 04:01:55 +00:00
update types
This commit is contained in:
@@ -47,20 +47,20 @@ func (a ABCIResults) Bytes() []byte {
|
||||
|
||||
// Hash returns a merkle hash of all results
|
||||
func (a ABCIResults) Hash() []byte {
|
||||
return merkle.SimpleHashFromHashables(a.toHashables())
|
||||
return merkle.SimpleHashFromHashers(a.toHashers())
|
||||
}
|
||||
|
||||
// ProveResult returns a merkle proof of one result from the set
|
||||
func (a ABCIResults) ProveResult(i int) merkle.SimpleProof {
|
||||
_, proofs := merkle.SimpleProofsFromHashables(a.toHashables())
|
||||
_, proofs := merkle.SimpleProofsFromHashers(a.toHashers())
|
||||
return *proofs[i]
|
||||
}
|
||||
|
||||
func (a ABCIResults) toHashables() []merkle.Hashable {
|
||||
func (a ABCIResults) toHashers() []merkle.Hasher {
|
||||
l := len(a)
|
||||
hashables := make([]merkle.Hashable, l)
|
||||
hashers := make([]merkle.Hasher, l)
|
||||
for i := 0; i < l; i++ {
|
||||
hashables[i] = a[i]
|
||||
hashers[i] = a[i]
|
||||
}
|
||||
return hashables
|
||||
return hashers
|
||||
}
|
||||
|
Reference in New Issue
Block a user