Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
jrick committed Jun 7, 2021
1 parent 101c808 commit 4e73041
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions wallet/udb/treasury.go
Expand Up @@ -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)})
}
Expand Down Expand Up @@ -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)})
}
Expand All @@ -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)})
}
Expand Down
3 changes: 2 additions & 1 deletion wallet/wallet.go
Expand Up @@ -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
}

Expand Down

0 comments on commit 4e73041

Please sign in to comment.