Skip to content

Commit

Permalink
mempool: Remove potential negative locktime check.
Browse files Browse the repository at this point in the history
This removes the standardness check to reject transactions with a lock
time greater than a maxint32 because the requirement for the check was
due to legacy Bitcoin reasons that have never applied to Decred.
  • Loading branch information
davecgh committed Sep 14, 2018
1 parent 2dcfb0a commit 2d6a3dd
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions mempool/mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -830,16 +830,6 @@ func (mp *TxPool) maybeAcceptTransaction(tx *dcrutil.Tx, isNew, rateLimit, allow
return nil, txRuleError(wire.RejectInvalid, str)
}

// Don't accept transactions with a lock time after the maximum int32
// value for now. This is an artifact of older bitcoind clients which
// treated this field as an int32 and would treat anything larger
// incorrectly (as negative).
if msgTx.LockTime > math.MaxInt32 {
str := fmt.Sprintf("transaction %v has a lock time after "+
"2038 which is not accepted yet", txHash)
return nil, txRuleError(wire.RejectNonstandard, str)
}

// Get the current height of the main chain. A standalone transaction
// will be mined into the next block at best, so its height is at least
// one more than the current height.
Expand Down

0 comments on commit 2d6a3dd

Please sign in to comment.