#include "base_tx.h"
Go to the source code of this file.
- Author
- Nathan Faber nfabe.nosp@m.r@ol.nosp@m.in.ed.nosp@m.u
- Version
- 0.1
- Date
- 2022-03-20
- Copyright
- Copyright (c) 2022
◆ check_input_unlockable()
int check_input_unlockable |
( |
Input * |
input, |
|
|
unsigned char * |
blank_tx_hash |
|
) |
| |
Check if a given input is unlockable iwth it's unlock script.
- Parameters
-
input | input to check |
blank_tx_hash | blank tx hash that the tx was signed with |
- Returns
- int 0 if unlockable not zero if unusable
◆ check_inputs_not_in_mempool()
Check if an UTXO in a transaction is already referenced in the mempool.
- Parameters
-
- Returns
- int 0 if valid, not zero if conflict found
◆ check_tx_double_spent()
Check if UTXO is double-spent in a transaction.
- Parameters
-
- Returns
- int 0 if valid, not zero if invalid
◆ create_blank_sig_txhash()
void create_blank_sig_txhash |
( |
unsigned char * |
blank_hash, |
|
|
Transaction * |
tx |
|
) |
| |
Create a copy of a transaction with blank signatures and hash it for signature validation.
- Parameters
-
blank_hash | destination for the blank signature hash |
tx | transaction to blank and hash |
◆ validate_coinbase_tx_parts_not_null()
int validate_coinbase_tx_parts_not_null |
( |
Transaction * |
tx | ) |
|
Check if a coinbase TX has a Null value in an improper place.
- Parameters
-
- Returns
- int 0 if a valid transaction, not zero if invalid
◆ validate_input()
int validate_input |
( |
Input * |
input, |
|
|
unsigned char * |
blank_tx_hash |
|
) |
| |
Wrapper to validate a transactions input in various ways, inputs size, utxo available, unlockable.
- Parameters
-
input | input to validate |
blank_tx_hash | tx hash of the larger transaction with signatures blanked |
- Returns
- int 0 if valid input, not zero if invalid input
◆ validate_input_matches_utxopool()
int validate_input_matches_utxopool |
( |
Input * |
input | ) |
|
Check if the inputs to a transaction exists in the utxo pool ignoring spent flag now. This cna likely be replaced by just checkign to see if the tx is in the mempool.
- Parameters
-
- Returns
- int 0 if input referneces a valid utxo, not zero if not
◆ validate_tx_incoming()
Validate incoming transactions from the network (different than block transaction validation)
- Parameters
-
tx | transaction to validate |
- Returns
- int 0 if incoming tx is valid, not zero if invalid
◆ validate_tx_parts_not_null()
Check if a Transaction (Not a coinbase tx) is malformed this should be the first check run on a transaction.
- Parameters
-
tx | transaction to validate |
- Returns
- int 0 if transaction is valid, not zero if nor
◆ validate_tx_shared()
Overall wrapper to validate an entire transaction that is NOT a Coinbase_tx.
- Parameters
-
tx | transaction to validate |
- Returns
- int 0 if transaction is valid, not zero if invalid