channeldb: rename paymentSeqMx
This commit is contained in:
1 file changed
+3
-3
@@ -120,7 +120,7 @@ var (
|
|||||||
// KVPaymentsDB implements persistence for payments and payment attempts.
|
// KVPaymentsDB implements persistence for payments and payment attempts.
|
||||||
type KVPaymentsDB struct {
|
type KVPaymentsDB struct {
|
||||||
// Sequence management for the kv store.
|
// Sequence management for the kv store.
|
||||||
paymentSeqMx sync.Mutex
|
seqMu sync.Mutex
|
||||||
currPaymentSeq uint64
|
currPaymentSeq uint64
|
||||||
storedPaymentSeq uint64
|
storedPaymentSeq uint64
|
||||||
|
|
||||||
@@ -757,8 +757,8 @@ func fetchPaymentBucketUpdate(tx kvdb.RwTx, paymentHash lntypes.Hash) (
|
|||||||
// nextPaymentSequence returns the next sequence number to store for a new
|
// nextPaymentSequence returns the next sequence number to store for a new
|
||||||
// payment.
|
// payment.
|
||||||
func (p *KVPaymentsDB) nextPaymentSequence() ([]byte, error) {
|
func (p *KVPaymentsDB) nextPaymentSequence() ([]byte, error) {
|
||||||
p.paymentSeqMx.Lock()
|
p.seqMu.Lock()
|
||||||
defer p.paymentSeqMx.Unlock()
|
defer p.seqMu.Unlock()
|
||||||
|
|
||||||
// Set a new upper bound in the DB every 1000 payments to avoid
|
// Set a new upper bound in the DB every 1000 payments to avoid
|
||||||
// conflicts on the sequence when using etcd.
|
// conflicts on the sequence when using etcd.
|
||||||
|
|||||||
Reference in new issue
Block a user