Move mixInLength below error handling

This commit is contained in:
Saolyn
2023-01-19 18:07:00 +01:00
parent 56ba0c9edb
commit 3276246729

View File

@@ -148,10 +148,10 @@ func (d *DepositTree) getRoot() [32]byte {
//nolint:unused
func (d *DepositTree) pushLeaf(leaf [32]byte) error {
var err error
d.mixInLength++
d.tree, err = d.tree.PushLeaf(leaf, DepositContractDepth)
if err != nil {
return err
}
d.mixInLength++
return nil
}