Commit graph

16 commits

Author SHA1 Message Date
Dave Collins 3c7511a34b Export the CheckTransactionInputs function. 2013-09-30 16:44:01 -05:00
Dave Collins e576962cb3 Export the CheckTransactionSanity function. 2013-09-30 16:43:10 -05:00
Dave Collins 6695cd15bb Export the IsCoinbase function. 2013-09-30 16:42:28 -05:00
Dave Collins 4eb135618a Export the IsFinalizedTransaction function. 2013-09-30 16:40:19 -05:00
Dave Collins fc69776371 Expose a transaction store and related functions.
Several of the functions require a map of contextual transaction data to
use as a source for referenced transactions.  This commit exports the
underlying TxData type and creates a new type TxStore, which is a map of
points to the under TxData.  In addition, this commit exposes a new
function, FetchTransactionStore, which returns a transaction store
(TxStore) containing all of the transactions referenced by the passed
transaction, as well as the existing transaction if it already exists.

This paves the way for subsequent commits which will expose some of the
functions which depend on this transaction store.
2013-09-30 16:37:11 -05:00
Dave Collins 117765ba7c Correct error message in other input tx lookup. 2013-08-28 13:50:47 -05:00
Dave Collins ffa56b437c Correct error msg for missing input transaction.
The error message for missing input transaction had the referenced and
referencing transactions backwards.
2013-08-28 13:46:17 -05:00
Dave Collins 10a62a37a3 Update for latest btcutil, btcscript, and btcwire.
This commit updates the calls into btcutil, btcscript, and btcwire for the
latest API changes which remove the need for the protocol version for
serialization and deserialization of blocks and transactions.
2013-08-05 18:53:50 -05:00
Dave Collins cef901ebad Export chain parameters.
This commit exports the chain parameters used depending on the specific
bitcoin network so callers can have access to this information if desired.
2013-07-30 12:38:27 -05:00
Dave Collins 829f187e47 Use network-specific genesis hash.
The test in checkConnectBlock for whether or not the node is the genesis
block needs to account for the genesis block of the specified network.
2013-07-29 20:21:24 -05:00
Dave Collins 04d88d01ec Clarify mismatched merkle root error message. 2013-07-29 19:50:00 -05:00
Dave Collins 077e1ec336 Improve second coinbase error message.
Include the index at which the second coinbase transaction was found.
2013-07-29 17:02:42 -05:00
Dave Collins 6409879e14 Modify count sigops calls for new btcscript API.
The btcscript API for GetSigOpCount and GetPreciseSigOpCount
recently changed to no longer return an error.  This change was necessary
to mirror the behavior of bitcoind signature operations counting.  This
commit modifies the code accordingly to use the new API.
2013-07-29 16:21:33 -05:00
Dave Collins b282678d9a Spend outputs while checking transaction inputs.
This commit modifies the double spend detection to handle double spends
within the same block as well as side chains when doing the checks before
reorganizing the chain.
2013-07-26 11:51:13 -05:00
Dave Collins f219ed5baf Add support for params based on active network.
This commit modifies the code to use params based on the active network
which paves the way for supporting the special rules and different genesis
blocks used by the test networks.
2013-07-24 12:26:17 -05:00
Dave Collins aa5847f3cc Initial implementation. 2013-07-19 08:50:13 -05:00