Export the IsFinalizedTransaction function.
This commit is contained in:
parent
fc69776371
commit
4eb135618a
2 changed files with 3 additions and 3 deletions
|
@ -60,7 +60,7 @@ func (b *BlockChain) maybeAcceptBlock(block *btcutil.Block) error {
|
|||
|
||||
// Ensure all transactions in the block are finalized.
|
||||
for i, tx := range block.MsgBlock().Transactions {
|
||||
if !isFinalizedTransaction(tx, blockHeight, blockHeader.Timestamp) {
|
||||
if !IsFinalizedTransaction(tx, blockHeight, blockHeader.Timestamp) {
|
||||
// Use the TxSha function from the block rather
|
||||
// than the transaction itself since the block version
|
||||
// is cached. Also, it's safe to ignore the error here
|
||||
|
|
|
@ -110,8 +110,8 @@ func isCoinBase(msgTx *btcwire.MsgTx) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
// isFinalized determines whether or not a transaction is finalized.
|
||||
func isFinalizedTransaction(msgTx *btcwire.MsgTx, blockHeight int64, blockTime time.Time) bool {
|
||||
// IsFinalizedTransaction determines whether or not a transaction is finalized.
|
||||
func IsFinalizedTransaction(msgTx *btcwire.MsgTx, blockHeight int64, blockTime time.Time) bool {
|
||||
// Lock time of zero means the transaction is finalized.
|
||||
lockTime := msgTx.LockTime
|
||||
if lockTime == 0 {
|
||||
|
|
Loading…
Add table
Reference in a new issue