diff --git a/wtxmgr/tx.go b/wtxmgr/tx.go index 512fe1a..8c9e574 100644 --- a/wtxmgr/tx.go +++ b/wtxmgr/tx.go @@ -984,6 +984,15 @@ func (s *Store) PutTxLabel(ns walletdb.ReadWriteBucket, txid chainhash.Hash, return err } + return PutTxLabel(labelBucket, txid, label) +} + +// PutTxLabel writes a label for a tx to the bucket provided. Note that it does +// not perform any validation on the label provided, or check whether there is +// an existing label for the txid. +func PutTxLabel(labelBucket walletdb.ReadWriteBucket, txid chainhash.Hash, + label string) error { + // We expect the label length to be limited on creation, so we can // store the label's length as a uint16. labelLen := uint16(len(label))