Skip to content

Commit bebfa0e

Browse files
committed
Add prevout.inside metadata and comments.
1 parent 8fd66c3 commit bebfa0e

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

include/bitcoin/system/chain/prevout.hpp

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ class BC_API prevout final
3737
{
3838
/// The confirmed chain height of the prevout (zero if not found).
3939
/// Unused if the input owning this prevout is null (coinbase).
40-
/// database: unused as validation precedes prevout block association.
4140
size_t height;
4241

4342
/// database: populated with a database identifier for the parent tx.
@@ -55,7 +54,7 @@ class BC_API prevout final
5554
/// database: unused as validation precedes prevout block association.
5655
uint32_t median_time_past{ max_uint32 };
5756

58-
/// Populated by block.populate() call as internal spends do not
57+
/// database: set via block.populate() as internal spends do not
5958
/// require prevout block association for relative locktime checks.
6059
/// So median_time_past is not required as locked is determined here.
6160
bool locked;
@@ -66,12 +65,17 @@ class BC_API prevout final
6665
/// An unspent coinbase collision is immature (unspendable) and spent
6766
/// collision is mature (bip30). CB collision presumed precluded by bip34.
6867
///************************************************************************
69-
/// If input owning this prevout is null (coinbase), this implies that
70-
/// all outputs of any duplicate txs are fully spent at height.
71-
/// If the input owning this prevout is not null (not coinbase), this
72-
/// indicates whether the prevout is spent at height (double spend).
73-
/// database: unused as validation precedes prevout block association.
74-
bool spent{ true };
68+
union
69+
{
70+
/// If input owning this prevout is null (coinbase), this implies that
71+
/// all outputs of any duplicate txs are fully spent at height.
72+
/// If the input owning this prevout is not null (not coinbase), this
73+
/// indicates whether the prevout is spent at height (double spend).
74+
bool spent{ true };
75+
76+
/// database: indicates that the input spends output inside same block.
77+
bool inside;
78+
};
7579

7680
/// The previous output is of a coinbase transaction.
7781
/// database: populated, does not require prevout block association.

0 commit comments

Comments
 (0)