Export the IsFinalizedTransaction function.

This commit is contained in:
Dave Collins 2013-09-30 16:40:07 -05:00
parent fc69776371
commit 4eb135618a
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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 {