aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
AgeCommit message (Collapse)Author
2018-04-02Merge #11742: rpc: Add testmempoolacceptWladimir J. van der Laan
b55555d rpc: Add testmempoolaccept (MarcoFalke) Pull request description: To check if a single raw transaction makes it into the current transaction pool, one had to call `sendrawtransaction`. However, on success, this adds the transaction to the mempool with no easy way to undo. The call `testmempoolaccept` is introduced to provide a way to solely check the result without changing the mempool state. Tree-SHA512: 5afd9311190135cee8fc1f229c7d39bf893f1028f29e28d34f70df820198ff97b4bf86b41cbbd6e6c36a5c30073cefa92d541c74a4939c7a2a6fa283dfd41b63
2018-03-30Merge #12740: Add native support for serializing char arrays without FLATDATAWladimir J. van der Laan
a7c45bc Add native support for serializing char arrays without FLATDATA (Pieter Wuille) Pull request description: Support is added to serialize arrays of type `char` or `unsigned char` directly, without any wrappers. All invocations of the `FLATDATA` wrappers that are obsoleted by this are removed. This includes a patch by @ryanofsky to make `char` casting type safe. The serialization of `CSubNet` is changed to serialize a `bool` directly rather than though `FLATDATA`. This makes the serialization independent of the size of the bool type (and will use 1 byte everywhere). This is a small change taken from #10785. Tree-SHA512: a41f61ca5fdc2fadb2d0e1702351a58a23841d551f505292a9542602cdb19f90d8944b8df14b872810a56bd201648fa4c0e958f3e9427fe829886284e85b9bfd
2018-03-29Bugfix: RPC: savemempool: Don't save until LoadMempool() is finishedJorge Timón
2018-03-28Merge #12798: doc: Refer to witness reserved value as spec. in the BIPWladimir J. van der Laan
adc2586 doc: Refer to witness reserved value as spec. in the BIP (MarcoFalke) Pull request description: BIP141 refers to the coinbase's input's witness that consists of a single 32-byte array as "witness reserved value". This updates the code to follow the BIP Tree-SHA512: 49c9463519bd11b9ff322eeecd638f7627aa8efdfb869f8549f9a160ff34281e1b5a0b9d83545a692de6f5ff795055292c423403b0f3ce7597e3f32273cf1deb
2018-03-27Merge #12653: Allow to optional specify the directory for the blocks storageWladimir J. van der Laan
a192636 -blocksdir: keep blockindex leveldb database in datadir (Jonas Schnelli) f38e4fd QA: Add -blocksdir test (Jonas Schnelli) 386a6b6 Allow to optional specify the directory for the blocks storage (Jonas Schnelli) Pull request description: Since the actual block files taking up more and more space, it may be desirable to have them stored in a different location then the data directory (use case: SSD for chainstate, etc., HD for blocks). This PR adds a `-blocksdir` option that allows one to keep the blockfiles and the blockindex external from the data directory (instead of creating symlinks). I fist had an option to keep the blockindex within the datadir, but seems to make no sense since accessing the index will (always) lead to access (r/w) the block files. Tree-SHA512: f8b9e1a681679eac25076dc30e45e6e12d4b2d9ac4be907cbea928a75af081dbcb0f1dd3e97169ab975f73d0bd15824c00c2a34638f3b284b39017171fce2409
2018-03-27Merge #10742: scripted-diff: Use scoped enumerations (C++11, "enum class")Wladimir J. van der Laan
1f45e21 scripted-diff: Convert 11 enums into scoped enums (C++11) (practicalswift) Pull request description: Rationale (from Bjarne Stroustrup's ["C++11 FAQ"](http://www.stroustrup.com/C++11FAQ.html#enum)): > > The enum classes ("new enums", "strong enums") address three problems with traditional C++ enumerations: > > * conventional enums implicitly convert to int, causing errors when someone does not want an enumeration to act as an integer. > * conventional enums export their enumerators to the surrounding scope, causing name clashes. > * the underlying type of an enum cannot be specified, causing confusion, compatibility problems, and makes forward declaration impossible. > > The new enums are "enum class" because they combine aspects of traditional enumerations (names values) with aspects of classes (scoped members and absence of conversions). Tree-SHA512: 9656e1cf4c3cabd4378c7a38d0c2eaf79e4a54d204a3c5762330840e55ee7e141e188a3efb2b4daf0ef3110bbaff80d8b9253abf2a9b015cdc4d60b49ac2b914
2018-03-26doc: Refer to witness reserved value as spec. in the BIPMarcoFalke
2018-03-24rpc: Add testmempoolacceptMarcoFalke
2018-03-21Add native support for serializing char arrays without FLATDATAPieter Wuille
Support is added to serialize arrays of type char or unsigned char directly, without any wrappers. All invocations of the FLATDATA wrappers that are obsoleted by this are removed. This includes a patch by Russell Yanofsky to make char casting type safe. The serialization of CSubNet is changed to serialize a bool directly rather than though FLATDATA. This makes the serialization independent of the size of the bool type (and will use 1 byte everywhere).
2018-03-21Fix typosDimitris Apostolou
2018-03-15Merge #12431: Only call NotifyBlockTip when chainActive changesWladimir J. van der Laan
f98b54352 Only call NotifyBlockTip when the active chain changes (James O'Beirne) 152b7fb25 [tests] Add a (failing) test for waitforblockheight (James O'Beirne) Pull request description: This is a subset of the more controversial https://github.com/bitcoin/bitcoin/pull/12407, but this also adds a test demonstrating the bug. In InvalidateBlock, we're calling NotifyBlockTip with the now-invalid block's prev regardless of what chain the ancestor block is on. This could create numerous issues, but it at least screws up `waitforblockheight` (or anything else relying on `rpc/blockchain.cpp:latestblock`) when InvalidateBlock is called on a block not in chainActive, which can happen via RPC. Only call NotifyBlockTip when the block being marked invalid is on the active chain. Tree-SHA512: 9a54fe5e8c7eb489daf5df4483c0986129e871e2ca931a456ba869ecb5d5a8d4f7bd27ccc9e711e9292c9ed79ddef896c85d0e81fc76883503e327995b0e914f
2018-03-13Merge #11041: Add LookupBlockIndexWladimir J. van der Laan
92fabcd44 Add LookupBlockIndex function (João Barbosa) 43a32b739 Add missing cs_lock in CreateWalletFromFile (João Barbosa) f814a3e8f Fix cs_main lock in LoadExternalBlockFile (João Barbosa) c651df8b3 Lock cs_main while loading block index in AppInitMain (João Barbosa) 02de6a6bc Assert cs_main is held when accessing mapBlockIndex (João Barbosa) Pull request description: Replace all `mapBlockIndex` lookups with the new `LookupBlockIndex()`. In some cases it avoids a second lookup. Tree-SHA512: ca31118f028a19721f2191d86f2dd398144d04df345694575a64aeb293be2f85785201480c3c578a0ec99690516205708558c0fd4168b09313378fd4e60a8412
2018-03-11Allow to optional specify the directory for the blocks storageJonas Schnelli
2018-03-09scripted-diff: Convert 11 enums into scoped enums (C++11)practicalswift
-BEGIN VERIFY SCRIPT- sed -i 's/enum DBErrors/enum class DBErrors/g' src/wallet/walletdb.h git grep -l DB_ | xargs sed -i 's/DB_\(LOAD_OK\|CORRUPT\|NONCRITICAL_ERROR\|TOO_NEW\|LOAD_FAIL\|NEED_REWRITE\)/DBErrors::\1/g' sed -i 's/^ DBErrors::/ /g' src/wallet/walletdb.h sed -i 's/enum VerifyResult/enum class VerifyResult/g' src/wallet/db.h sed -i 's/\(VERIFY_OK\|RECOVER_OK\|RECOVER_FAIL\)/VerifyResult::\1/g' src/wallet/db.cpp sed -i 's/enum ThresholdState/enum class ThresholdState/g' src/versionbits.h git grep -l THRESHOLD_ | xargs sed -i 's/THRESHOLD_\(DEFINED\|STARTED\|LOCKED_IN\|ACTIVE\|FAILED\)/ThresholdState::\1/g' sed -i 's/^ ThresholdState::/ /g' src/versionbits.h sed -i 's/enum SigVersion/enum class SigVersion/g' src/script/interpreter.h git grep -l SIGVERSION_ | xargs sed -i 's/SIGVERSION_\(BASE\|WITNESS_V0\)/SigVersion::\1/g' sed -i 's/^ SigVersion::/ /g' src/script/interpreter.h sed -i 's/enum RetFormat {/enum class RetFormat {/g' src/rest.cpp sed -i 's/RF_\(UNDEF\|BINARY\|HEX\|JSON\)/RetFormat::\1/g' src/rest.cpp sed -i 's/^ RetFormat::/ /g' src/rest.cpp sed -i 's/enum HelpMessageMode {/enum class HelpMessageMode {/g' src/init.h git grep -l HMM_ | xargs sed -i 's/HMM_BITCOIN/HelpMessageMode::BITCOIN/g' sed -i 's/^ HelpMessageMode::/ /g' src/init.h sed -i 's/enum FeeEstimateHorizon/enum class FeeEstimateHorizon/g' src/policy/fees.h sed -i 's/enum RBFTransactionState/enum class RBFTransactionState/g' src/policy/rbf.h git grep -l RBF_ | xargs sed -i 's/RBF_TRANSACTIONSTATE_\(UNKNOWN\|REPLACEABLE_BIP125\|FINAL\)/RBFTransactionState::\1/g' sed -i 's/^ RBFTransactionState::/ /g' src/policy/rbf.h sed -i 's/enum BlockSource {/enum class BlockSource {/g' src/qt/clientmodel.h git grep -l BLOCK_SOURCE_ | xargs sed -i 's/BLOCK_SOURCE_\(NONE\|REINDEX\|DISK\|NETWORK\)/BlockSource::\1/g' sed -i 's/^ BlockSource::/ /g' src/qt/clientmodel.h sed -i 's/enum FlushStateMode {/enum class FlushStateMode {/g' src/validation.cpp sed -i 's/FLUSH_STATE_\(NONE\|IF_NEEDED\|PERIODIC\|ALWAYS\)/FlushStateMode::\1/g' src/validation.cpp sed -i 's/^ FlushStateMode::/ /g' src/validation.cpp sed -i 's/enum WitnessMode {/enum class WitnessMode {/g' src/test/script_tests.cpp sed -i 's/WITNESS_\(NONE\|PKH\|SH\)/WitnessMode::\1/g' src/test/script_tests.cpp sed -i 's/^ WitnessMode::/ /g' src/test/script_tests.cpp -END VERIFY SCRIPT-
2018-03-09Format timestamps using ISO 8601 formatting (e.g. "2018-02-28T12:34:56Z")practicalswift
* Z is the zone designator for the zero UTC offset. * T is the delimiter used to separate date and time. This makes it clear for the end-user that the date/time logged is specified in UTC and not in the local time zone.
2018-03-07Merge #12204: Fix overly eager BIP30 bypassWladimir J. van der Laan
5b8b38775 Fix overly eager BIP30 bypass (Alex Morcos) Pull request description: In #6931 we introduced a possible consensus breaking change by misunderstanding how completely BIP 34 obviated the need for BIP 30. Unfixed, this could break consensus after block height about 1.9M. Explained in code comment. h/t @sdaftuar Tree-SHA512: 8f798c3f203432fd4ae1c1c08bd6967b4a5ec2064ed5f6a7dcf3bff34ea830952838dd4ff70d70b5080cf4644f601e5526b60456c08f43789e4aae05621d9d6b
2018-03-06Add LookupBlockIndex functionJoão Barbosa
2018-03-06Fix cs_main lock in LoadExternalBlockFileJoão Barbosa
When accessing mapBlockIndex cs_main must be held.
2018-03-06Assert cs_main is held when accessing mapBlockIndexJoão Barbosa
2018-03-05Merge #11880: Stop special-casing phashBlock handling in validation for TBVWladimir J. van der Laan
9c5a4a6ed Stop special-casing phashBlock handling in validation for TBV (Matt Corallo) Pull request description: There is no reason to do this, really, we already have "ignore PoW" flags. Motivated by https://github.com/bitcoin/bitcoin/pull/11739#discussion_r155841721 Tree-SHA512: 37cb1ae5b11c9e8ed7a679bb07ad3b119a2a014744b26d197d67ba21beb19fe6815271df935e40f7c7bd5f2e4d7ae4dad7bd4d00fa230a8d789f37e9de31a769
2018-02-25Merge #12287: Optimise lock behaviour for GuessVerificationProgress()Jonas Schnelli
90ba2df11 Fix missing cs_main lock for GuessVerificationProgress() (Jonas Schnelli) Pull request description: `GuessVerificationProgress()` needs `cs_main` due to accessing the `pindex->nChainTx`. This adds a `AssertLockHeld` in `GuessVerificationProgress()` and adds the missing locks in... * `LoadChainTip()` * `ScanForWalletTransactions()` (got missed in #11281) * GUI, `ClientModel::getVerificationProgress()` <--- **this may have GUI performance impacts**, but could be relaxed later with a cache or something more efficient. Tree-SHA512: 13302946571422375f32af8e396b9d2c1180f2693ea363aeba9e98c8266ddec64fe7862bfdcbb5a93a4b12165a61eec1e51e4e7d7a8515fa50879095dc163412
2018-02-16Only call NotifyBlockTip when the active chain changesJames O'Beirne
Previously, if `invalidateblock` was called on a block in a branch, NotifyBlockTip would be called on that block's predecessor, creating an incorrect `rpc/blockchain.cpp:latestblock` value. Only call NotifyBlockTip if the chain being modified is activeChain.
2018-02-15Merge #12349: shutdown: fix crash on shutdown with reindex-chainstateWladimir J. van der Laan
ceaefdd fix possible shutdown assertion with -reindex-shutdown (Cory Fields) Pull request description: Fixes the assertion error reported here: https://github.com/bitcoin/bitcoin/pull/12349#issuecomment-365095741 Tree-SHA512: db8e2a275f92a99df7f17852d00eba6df996e412aa3ed3853a9ea0a8cb9800760677532efd52f92abbf2cdcc4210957a87a5f919ac998d46c205365a7a7dffca
2018-02-15Fix overly eager BIP30 bypassAlex Morcos
2018-02-15Merge #12356: Fix 'mempool min fee not met' debug outputWladimir J. van der Laan
bb00c95 Consistently use FormatStateMessage in RPC error output (Ben Woosley) 8b8a1c4 Add test for 'mempool min fee not met' rpc error (Ben Woosley) c04e0f6 Fix 'mempool min fee not met' debug output (Ben Woosley) Pull request description: Output the value that is tested, rather than the unmodified fee value. Prompted by looking into: #11955 Tree-SHA512: fc0bad47d4af375d208f657a6ccbad6ef7f4e2989ae2ce1171226c22fa92847494a2c55cca687bd5a1548663ed3313569bcc31c00d53c0c193a1b865dd8a7657
2018-02-13fix possible shutdown assertion with -reindex-shutdownCory Fields
Credit @eklitzke for reproducing.
2018-02-12Merge #12381: Remove more boost threadsWladimir J. van der Laan
004f999 boost: drop boost threads for [alert|block|wallet]notify (Cory Fields) 0827267 boost: drop boost threads from torcontrol (Cory Fields) ba91724 boost: remove useless threadGroup parameter from Discover (Cory Fields) f26866b boost: drop boost threads for upnp (Cory Fields) Pull request description: This doesn't completely get rid of boost::thread, but this batch should be easy to review, and leaves us with only threadGroup (scheduler + scriptcheck) remaining. Note to reviewers: The upnp diff changes a bunch of whitespace, it's much more clear with 'git diff -w' Tree-SHA512: 5a356798d0785f93ed143d1f0afafe890bc82f0d470bc969473da2d2aa78bcb9b096f7ba11b92564d546fb447d4bd0d347e7842994ea0170aafd53fda7e0a66e
2018-02-08boost: drop boost threads for [alert|block|wallet]notifyCory Fields
2018-02-08Fix 'mempool min fee not met' debug outputBen Woosley
Output the value that is tested, rather than the unmodified fee value.
2018-02-08Merge #12368: Hold mempool.cs for the duration of ATMP.Wladimir J. van der Laan
02fc886 Add braces to meet code style on line-after-the-one-changed. (Matt Corallo) 85aa839 Hold mempool.cs for the duration of ATMP. (Matt Corallo) Pull request description: This resolves an issue where getrawmempool() can race mempool notification signals. Intuitively we use mempool.cs as a "read lock" on the mempool with cs_main being the write lock, so holding the read lock intermittently while doing write operations is somewhat strange. This also avoids the introduction of cs_main in getrawmempool() which reviewers objected to in the previous fix in #12273 Tree-SHA512: 29464b9ca3890010ae13b7dc1c53487cc2bc9c3cf3d32a14cb09c8aa33848f57959d8991ea096beebcfb72f062e4e1962f104aefe4252c7db87633bbfe4ab317
2018-02-08Merge #12367: Fix two fast-shutdown bugsWladimir J. van der Laan
dd2de47 Fix fast-shutdown crash if genesis block was not loaded (Matt Corallo) 1c9394a Fix fast-shutdown hang on ThreadImport+GenesisWait (Matt Corallo) Pull request description: The second commit is a much simpler alternative fix for the issue fixed in #12349. To test I made ShutdownRequested() always StartShutdown() after a certain number of calls, which turned up one other hang, fixed in the first commit. Tree-SHA512: 86bde6ac4b8b4e2cb99fff87dafeed02c0d9514acee6d94455637fb2da9ffc274b5ad31b0a6b9f5bd7b700ae35395f28ddb14ffc65ddda3619aa28df28a5607d
2018-02-07Merge #10498: Use static_cast instead of C-style casts for non-fundamental typesMarcoFalke
9ad6746ccd Use static_cast instead of C-style casts for non-fundamental types (practicalswift) Pull request description: A C-style cast is equivalent to try casting in the following order: 1. `const_cast(...)` 2. `static_cast(...)` 3. `const_cast(static_cast(...))` 4. `reinterpret_cast(...)` 5. `const_cast(reinterpret_cast(...))` By using `static_cast<T>(...)` explicitly we avoid the possibility of an unintentional and dangerous `reinterpret_cast`. Furthermore `static_cast<T>(...)` allows for easier grepping of casts. For a more thorough discussion, see ["ES.49: If you must use a cast, use a named cast"](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es49-if-you-must-use-a-cast-use-a-named-cast) in the C++ Core Guidelines (Stroustrup & Sutter). Tree-SHA512: bd6349b7ea157da93a47b8cf238932af5dff84731374ccfd69b9f732fabdad1f9b1cdfca67497040f14eaa85346391404f4c0495e22c467f26ca883cd2de4d3c
2018-02-06Fix fast-shutdown crash if genesis block was not loadedMatt Corallo
If the ShutdownRequested() check at the top of ActivateBestChain() returns false during initial genesis block load we will fail an assertion in UTXO DB flush as the best block hash IsNull(). To work around this, we move the check until after one round of ActivateBestChainStep(), ensuring the genesis block gets connected.
2018-02-06Add braces to meet code style on line-after-the-one-changed.Matt Corallo
2018-02-06Hold mempool.cs for the duration of ATMP.Matt Corallo
This resolves an issue where getrawmempool() can race mempool notification signals. Intuitively we use mempool.cs as a "read lock" on the mempool with cs_main being the write lock, so holding the read lock intermittently while doing write operations is somewhat strange. This also avoids the introduction of cs_main in getrawmempool() which reviewers objected to in the previous fix in #12273
2018-01-30Fix missing cs_main lock for GuessVerificationProgress()Jonas Schnelli
2018-01-28Fix typospracticalswift
2018-01-23Reduce cs_main lock in ReadBlockFromDisk, only read GetBlockPos under the lockJonas Schnelli
2018-01-03Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa
2017-12-26Add helper to wait for validation interface queue to catch upMatt Corallo
2017-12-26Block ActivateBestChain to empty validationinterface queueMatt Corallo
2017-12-26Require no cs_main lock for ProcessNewBlock/ActivateBestChainMatt Corallo
This requires the removal of some very liberal (incorrect) cs_mains sprinkled in some tests. It adds some chainActive.Tip() races, but the tests are all single-threaded anyway.
2017-12-12Stop special-casing phashBlock handling in validation for TBVMatt Corallo
2017-12-12Merge #10574: Remove includes in .cpp files for things the corresponding .h ↵Wladimir J. van der Laan
file already included a720b92 Remove includes in .cpp files for things the corresponding .h file already included (practicalswift) Pull request description: Remove includes in .cpp files for things the corresponding .h file already included. Example case: * `addrdb.cpp` includes `addrdb.h` and `fs.h` * `addrdb.h` includes `fs.h` Then remove the direct inclusion of `fs.h` in `addrman.cpp` and rely on the indirect inclusion of `fs.h` via the included `addrdb.h`. In line with the header include guideline (see #10575). Tree-SHA512: 8704b9de3011a4c234db336a39f7d2c139e741cf0f7aef08a5d3e05197e1e18286b863fdab25ae9638af4ff86b3d52e5cab9eed66bfa2476063aa5c79f9b0346
2017-12-12Merge #10279: Add a CChainState class to validation.cpp to take another step ↵Wladimir J. van der Laan
towards clarifying internal interfaces 22fddde Avoid calling GetSerializeSize on each tx in a block if !fTxIndex (Matt Corallo) 2862aca Move some additional variables into CChainState private (Matt Corallo) fd4d80a Create initial CChainState to hold chain state information (Matt Corallo) e104f0f Move block writing out of AcceptBlock (Matt Corallo) 50701ba Move txindex/undo data disk location stuff out of ConnectBlock (Matt Corallo) 93a34cf Make DisconnectBlock unaware of where undo data resides on disk (Matt Corallo) Pull request description: CChainState should eventually, essentially, be our exposed "libconsensus", but we're probably a few releases away, so the real goal is to clarify our internal interfaces. The main split was a big step, but validation.cpp is still a somewhat ranomly-mixed bag of functions that are pure functions which validate inputs (which should probably either merge with their callers or move into another file in consensus/), read/write data from disk, manipulate our current chain state (which moves into CChainState), and do mempool transaction validation. Obviously this is only a small step, but some effort is made to clean up what functions the functions in CChainState call, and obviously as things are added its easy to keep clear "CChainState::* cannot call anything except via callbacks through CValidationInterface, pure functions, or disk read/write things". Right now there are some glaring violations in mempool callbacks, and general flushing logic needs cleaning up (FlushStateToDisk maybe shouldnt be called, and there should be an API towards setDirtyBlockIndex, but I'll leave that for after @sipa's current changesets land). Tree-SHA512: 69b8ec191b36b19c9492b4dee74c8057621fb6ec98ad219e8da0b2ed5c3ad711b10b5af9ff1117e8807ccf88918eeeab573be8448baecc9a59f099c53095985b
2017-12-06Merge #10275: [rpc] Allow fetching tx directly from specified block in ↵Wladimir J. van der Laan
getrawtransaction 434526a [test] Add tests for getrawtransaction with block hash. (Karl-Johan Alm) b167951 [rpc] Allow getrawtransaction to take optional blockhash to fetch transaction from a block directly. (Karl-Johan Alm) a5f5a2c [rpc] Fix fVerbose parsing (remove excess if cases). (Karl-Johan Alm) Pull request description: [Reviewer hint: use [?w=1](https://github.com/bitcoin/bitcoin/pull/10275/files?w=1) to avoid seeing a bunch of indentation changes.] Presuming a user knows the block hash of the block containing a given transaction, this PR allows them to fetch the raw transaction, even without `-txindex`. It also enables support for getting transactions that are in orphaned blocks. Note that supplying a block hash will override mempool and txindex support in `GetTransaction`. The rationale behind this is that a transaction may be in multiple places (orphaned blocks) and if the user supplies an explicit block hash it should be adhered to. ```Bash $ # a41.. is a tx inside an orphan block ..3c6f.. -- first try getting it normally $ ./bitcoin-cli getrawtransaction a41e66ee1341aa9fb9475b98cfdc1fe1261faa56c0a49254f33065ec90f7cd79 1 error code: -5 error message: No such mempool transaction. Use -txindex to enable blockchain transaction queries. Use gettransaction for wallet transactions. $ # now try with block hash $ ./bitcoin-cli getrawtransaction a41e66ee1341aa9fb9475b98cfdc1fe1261faa56c0a49254f33065ec90f7cd79 1 0000000000000000003c6fe479122bfa4a9187493937af1734e1e5cd9f198ec7 { "hex": "01000000014e7e81144e42f6d65550e59b715d470c9301fd7ac189[...]90488ac00000000", "inMainChain": false, "txid": "a41e66ee1341aa9fb9475b98cfdc1fe1261faa56c0a49254f33065ec90f7cd79", "hash": "a41e66ee1341aa9fb9475b98cfdc1fe1261faa56c0a49254f33065ec90f7cd79", "size": 225, [...] } $ # another tx 6c66... in block 462000 $ ./bitcoin-cli getrawtransaction 6c66b98191e9d6cc671f6817142152ebf6c5cab2ef008397b5a71ac13255a735 1 00000000000000000217f2c12922e321f6d4aa933ce88005a9a493c503054a40 { "hex": "0200000004d157[...]88acaf0c0700", "inMainChain": true, "txid": "6c66b98191e9d6cc671f6817142152ebf6c5cab2ef008397b5a71ac13255a735", "hash": "6c66b98191e9d6cc671f6817142152ebf6c5cab2ef008397b5a71ac13255a735", "size": 666, [...] } $ ``` Tree-SHA512: 279be3818141edd3cc194a9ee65929331920afb30297ab2d6da07293a2d7311afee5c8b00c6457477d9f1f86e86786a9b56878ea3ee19fa2629b829d042d0cda
2017-12-05[rpc] Allow getrawtransaction to take optional blockhash to fetch ↵Karl-Johan Alm
transaction from a block directly.
2017-12-04Avoid calling GetSerializeSize on each tx in a block if !fTxIndexMatt Corallo
2017-12-04Move some additional variables into CChainState privateMatt Corallo
2017-12-04Create initial CChainState to hold chain state informationMatt Corallo