diff --git a/mempool/mempool.go b/mempool/mempool.go index 63a86a16..7ada3d29 100644 --- a/mempool/mempool.go +++ b/mempool/mempool.go @@ -927,7 +927,7 @@ func (mp *TxPool) validateReplacement(tx *btcutil.Tx, func (mp *TxPool) maybeAcceptTransaction(tx *btcutil.Tx, isNew, rateLimit, rejectDupOrphans bool) ([]*chainhash.Hash, *TxDesc, error) { txHash := tx.Hash() - // If a transaction has iwtness data, and segwit isn't active yet, If + // If a transaction has witness data, and segwit isn't active yet, If // segwit isn't active yet, then we won't accept it into the mempool as // it can't be mined yet. if tx.MsgTx().HasWitness() { @@ -937,8 +937,14 @@ func (mp *TxPool) maybeAcceptTransaction(tx *btcutil.Tx, isNew, rateLimit, rejec } if !segwitActive { + simnetHint := "" + if mp.cfg.ChainParams.Net == wire.SimNet { + bestHeight := mp.cfg.BestHeight() + simnetHint = fmt.Sprintf(" (The threshold for segwit activation is 300 blocks on simnet, "+ + "current best height is %d)", bestHeight) + } str := fmt.Sprintf("transaction %v has witness data, "+ - "but segwit isn't active yet", txHash) + "but segwit isn't active yet%s", txHash, simnetHint) return nil, nil, txRuleError(wire.RejectNonstandard, str) } }