aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2014-09-02 18:56:47 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2014-09-02 18:57:43 +0200
commit910526d8487e5db04b4f280efcd05d95e6dc273f (patch)
tree25a3cecf0604fce52c1730743003fc9cde530207 /src/main.h
parentb8d92236f61699846f67d8ce6cb55458a46f9de1 (diff)
downloadbitcoin-910526d8487e5db04b4f280efcd05d95e6dc273f.tar.xz
Use OR of respective block flags for masks
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.h b/src/main.h
index 31a1131b83..9688b53dc4 100644
--- a/src/main.h
+++ b/src/main.h
@@ -548,15 +548,16 @@ enum BlockStatus {
BLOCK_VALID_TRANSACTIONS = 3, // only first tx is coinbase, 2 <= coinbase input script length <= 100, transactions valid, no duplicate txids, sigops, size, merkle root
BLOCK_VALID_CHAIN = 4, // outputs do not overspend inputs, no double spends, coinbase output ok, immature coinbase spends, BIP30
BLOCK_VALID_SCRIPTS = 5, // scripts/signatures ok
- BLOCK_VALID_MASK = 7,
+ BLOCK_VALID_MASK = BLOCK_VALID_HEADER | BLOCK_VALID_TREE | BLOCK_VALID_TRANSACTIONS |
+ BLOCK_VALID_CHAIN | BLOCK_VALID_SCRIPTS,
BLOCK_HAVE_DATA = 8, // full block available in blk*.dat
BLOCK_HAVE_UNDO = 16, // undo data available in rev*.dat
- BLOCK_HAVE_MASK = 24,
+ BLOCK_HAVE_MASK = BLOCK_HAVE_DATA | BLOCK_HAVE_UNDO,
BLOCK_FAILED_VALID = 32, // stage after last reached validness failed
BLOCK_FAILED_CHILD = 64, // descends from failed block
- BLOCK_FAILED_MASK = 96
+ BLOCK_FAILED_MASK = BLOCK_FAILED_VALID | BLOCK_FAILED_CHILD,
};
/** The block chain is a tree shaped structure starting with the