diff --git a/proof_iavl_absence.go b/proof_iavl_absence.go index e08112e7e..51edd5a5d 100644 --- a/proof_iavl_absence.go +++ b/proof_iavl_absence.go @@ -15,7 +15,7 @@ const ProofOpIAVLAbsence = "iavl:a" // is good. type IAVLAbsenceOp struct { // Encoded in ProofOp.Key. - key string + key []byte // To encode in ProofOp.Data. // Proof is nil for an empty tree. @@ -25,7 +25,7 @@ type IAVLAbsenceOp struct { var _ merkle.ProofOperator = IAVLAbsenceOp{} -func NewIAVLAbsenceOp(key string, proof *RangeProof) IAVLAbsenceOp { +func NewIAVLAbsenceOp(key []byte, proof *RangeProof) IAVLAbsenceOp { return IAVLAbsenceOp{ key: key, Proof: proof, @@ -82,6 +82,6 @@ func (op IAVLAbsenceOp) Run(args [][]byte) ([][]byte, error) { return [][]byte{root}, nil } -func (op IAVLAbsenceOp) GetKey() string { +func (op IAVLAbsenceOp) GetKey() []byte { return op.key } diff --git a/proof_iavl_value.go b/proof_iavl_value.go index 7490a5b3f..a2cbf122d 100644 --- a/proof_iavl_value.go +++ b/proof_iavl_value.go @@ -16,7 +16,7 @@ const ProofOpIAVLValue = "iavl:v" // is good. type IAVLValueOp struct { // Encoded in ProofOp.Key. - key string + key []byte // To encode in ProofOp.Data. // Proof is nil for an empty tree. @@ -26,7 +26,7 @@ type IAVLValueOp struct { var _ merkle.ProofOperator = IAVLValueOp{} -func NewIAVLValueOp(key string, proof *RangeProof) IAVLValueOp { +func NewIAVLValueOp(key []byte, proof *RangeProof) IAVLValueOp { return IAVLValueOp{ key: key, Proof: proof, @@ -81,6 +81,6 @@ func (op IAVLValueOp) Run(args [][]byte) ([][]byte, error) { return [][]byte{root}, nil } -func (op IAVLValueOp) GetKey() string { +func (op IAVLValueOp) GetKey() []byte { return op.key }