Various BCH-only CashToken-related changes including:
Bumped Fulcrum version to 1.9.0
Modified electrum protocol and bumped the electrum cash protocol version to 1.5.0
Updates to blockchain.*.listunspent and blockchain.*.get_balance to take an optional second argument, token_filter to indicate whether to filter out token UTXOs or not.
Bumped DB version to v2, and made Fulcrum detect if it's running against an older DB after cashtokens activation, and refuse to run in that case (this test applies to BCH only).
Since UTXO data (type TXOInfo in this codebase) is now variable-sized (depending on whether it has tokens on it or not), modified the undo DB table format and bumped the version to V3 (it can still read V1 or V2 data but V3 is written-out now for new blocks).
Optimized performance of blockchain.*.listunspent to not do an un-needed extra lookup into the utxoset table -- it has all the data it needs right there from the scruphash_unspent table.
Added two new RPCs: blockchain.headers.get_tip to return the current blockchain tip (same result as you would get from blockchain.headers.subscribe but without actually subscribing to anything).
Added blockchain.headers.unsubscribe to undo the effects of a previous call to blockchain.headers.subscribe (added for symmetry and since all the other *.subscribe methods already allow unsubscribing, this was the odd-man-out).
Various BCH-only CashToken-related changes including:
blockchain.*.listunspent
andblockchain.*.get_balance
to take an optional second argument,token_filter
to indicate whether to filter out token UTXOs or not.blockchain.utxo.get_info
andblockchain.*.listunspent
now also may return a new key,token_data
, for UTXOs with tokens on them. This is documented here: https://electrum-cash-protocol.readthedocs.io/en/latest/protocol-basics.html#cashtoken-supportTXOInfo
in this codebase) is now variable-sized (depending on whether it has tokens on it or not), modified the undo DB table format and bumped the version to V3 (it can still read V1 or V2 data but V3 is written-out now for new blocks).blockchain.*.listunspent
to not do an un-needed extra lookup into theutxoset
table -- it has all the data it needs right there from thescruphash_unspent
table.blockchain.headers.get_tip
to return the current blockchain tip (same result as you would get fromblockchain.headers.subscribe
but without actually subscribing to anything).blockchain.headers.unsubscribe
to undo the effects of a previous call toblockchain.headers.subscribe
(added for symmetry and since all the other*.subscribe
methods already allow unsubscribing, this was the odd-man-out).