chainntnfs: initialize TxNotifier with new ReorgSafetyLimit
This commit is contained in:
7 files changed
+58
-40
No files matched your search
@@ -21,11 +21,6 @@ const (
|
||||
// notifierType uniquely identifies this concrete implementation of the
|
||||
// ChainNotifier interface.
|
||||
notifierType = "btcd"
|
||||
|
||||
// reorgSafetyLimit is assumed maximum depth of a chain reorganization.
|
||||
// After this many confirmation, transaction confirmation info will be
|
||||
// pruned.
|
||||
reorgSafetyLimit = 100
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -163,8 +158,8 @@ func (b *BtcdNotifier) Start() error {
|
||||
}
|
||||
|
||||
b.txNotifier = chainntnfs.NewTxNotifier(
|
||||
uint32(currentHeight), reorgSafetyLimit, b.confirmHintCache,
|
||||
b.spendHintCache,
|
||||
uint32(currentHeight), chainntnfs.ReorgSafetyLimit,
|
||||
b.confirmHintCache, b.spendHintCache,
|
||||
)
|
||||
|
||||
b.bestBlock = chainntnfs.BlockEpoch{
|
||||
|
||||
@@ -29,8 +29,8 @@ func (b *BtcdNotifier) UnsafeStart(bestHeight int32, bestHash *chainhash.Hash,
|
||||
}
|
||||
|
||||
b.txNotifier = chainntnfs.NewTxNotifier(
|
||||
uint32(bestHeight), reorgSafetyLimit, b.confirmHintCache,
|
||||
b.spendHintCache,
|
||||
uint32(bestHeight), chainntnfs.ReorgSafetyLimit,
|
||||
b.confirmHintCache, b.spendHintCache,
|
||||
)
|
||||
|
||||
b.chainUpdates.Start()
|
||||
|
||||
Reference in new issue
Block a user