diff --git a/wallet/udb/treasury.go b/wallet/udb/treasury.go index a52bb68b5..ceb929aa6 100644 --- a/wallet/udb/treasury.go +++ b/wallet/udb/treasury.go @@ -39,6 +39,7 @@ func SetTSpendPolicy(dbtx walletdb.ReadWriteTx, hash *chainhash.Hash, if err != nil { return errors.E(errors.IO, err) } + return nil } return b.Put(hash[:], []byte{byte(policy)}) } @@ -156,6 +157,7 @@ func SetTreasuryKeyPolicy(dbtx walletdb.ReadWriteTx, pikey []byte, if err != nil { return errors.E(errors.IO, err) } + return nil } return b.Put(pikey, []byte{byte(policy)}) } @@ -175,6 +177,7 @@ func SetVSPTreasuryKeyPolicy(dbtx walletdb.ReadWriteTx, ticket *chainhash.Hash, if err != nil { return errors.E(errors.IO, err) } + return nil } return b.Put(k, []byte{byte(policy)}) } diff --git a/wallet/wallet.go b/wallet/wallet.go index f81fa60f0..aacd9bf2a 100644 --- a/wallet/wallet.go +++ b/wallet/wallet.go @@ -575,7 +575,8 @@ func (w *Wallet) TSpendPolicy(tspendHash, ticketHash *chainhash.Hash) stake.Trea if ok { return policy } - } else if policy, ok := w.tspendPolicy[*tspendHash]; ok { + } + if policy, ok := w.tspendPolicy[*tspendHash]; ok { return policy }