chainntnfs: initialize TxNotifier with new ReorgSafetyLimit

This commit is contained in:
Wilmer Paulino committed 2019-01-11 16:58:15 -08:00
1 parent 9d51114546
commit 7239e04696
7 files changed
+58 -40

No files matched your search

+2 -7
View File
@@ -20,11 +20,6 @@ const (
// notifierType uniquely identifies this concrete implementation of the
// ChainNotifier interface.
notifierType = "bitcoind"
// reorgSafetyLimit is assumed maximum depth of a chain reorganization.
// After this many confirmation, transaction confirmation info will be
// pruned.
reorgSafetyLimit = 100
)
var (
@@ -138,8 +133,8 @@ func (b *BitcoindNotifier) 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{
+2 -2
View File
@@ -30,8 +30,8 @@ func (b *BitcoindNotifier) UnsafeStart(bestHeight int32, bestHash *chainhash.Has
}
b.txNotifier = chainntnfs.NewTxNotifier(
uint32(bestHeight), reorgSafetyLimit, b.confirmHintCache,
b.spendHintCache,
uint32(bestHeight), chainntnfs.ReorgSafetyLimit,
b.confirmHintCache, b.spendHintCache,
)
if generateBlocks != nil {