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

+1 -7
View File
@@ -25,12 +25,6 @@ const (
// notifierType uniquely identifies this concrete implementation of the
// ChainNotifier interface.
notifierType = "neutrino"
// reorgSafetyLimit is the chain depth beyond which it is assumed a block
// will not be reorganized out of the chain. This is used to determine when
// to prune old confirmation requests so that reorgs are handled correctly.
// The coinbase maturity period is a reasonable value to use.
reorgSafetyLimit = 100
)
var (
@@ -159,7 +153,7 @@ func (n *NeutrinoNotifier) Start() error {
}
n.txNotifier = chainntnfs.NewTxNotifier(
n.bestHeight, reorgSafetyLimit, n.confirmHintCache,
n.bestHeight, chainntnfs.ReorgSafetyLimit, n.confirmHintCache,
n.spendHintCache,
)
+2 -2
View File
@@ -49,8 +49,8 @@ func (n *NeutrinoNotifier) UnsafeStart(bestHeight int32,
}
n.txNotifier = chainntnfs.NewTxNotifier(
uint32(bestHeight), reorgSafetyLimit, n.confirmHintCache,
n.spendHintCache,
uint32(bestHeight), chainntnfs.ReorgSafetyLimit,
n.confirmHintCache, n.spendHintCache,
)
n.chainConn = &NeutrinoChainConn{n.p2pNode}