mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Merge 92fee79dab into merged_master (Bitcoin PR #19806)
Looks like James hardcoded a couple hashes in hard-to-find places, which caused a unit test to fail. I just changed the hash (which covers UTXO data which naturally will be different for us on account of our differently formatted CTxOuts). TODO: determine how Assumeutxo interacts with the fact that we don't save out nonces in our normal UTXO serialization. Probably we will need to remove the nonce from the CCoinStats serialization to avoid having inconsistent hashes across nodes, since these hashes are now checked in assumeutxo?
This commit is contained in:
commit
61a241c5ca
17 changed files with 715 additions and 30 deletions
|
|
@ -10,7 +10,6 @@
|
|||
#include <hash.h> // for signet block challenge hash
|
||||
#include <issuance.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <tinyformat.h>
|
||||
#include <util/system.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <crypto/sha256.h>
|
||||
|
|
@ -207,6 +206,10 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
m_assumeutxo_data = MapAssumeutxo{
|
||||
// TODO to be specified in a future patch.
|
||||
};
|
||||
|
||||
chainTxData = ChainTxData{
|
||||
// Data from RPC: getchaintxstats 4096 0000000000000000000b9d2ec5a352ecba0592946514a92f14319dc2b367fc72
|
||||
/* nTime */ 1603995752,
|
||||
|
|
@ -310,6 +313,10 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
m_assumeutxo_data = MapAssumeutxo{
|
||||
// TODO to be specified in a future patch.
|
||||
};
|
||||
|
||||
chainTxData = ChainTxData{
|
||||
// Data from RPC: getchaintxstats 4096 000000000000006433d1efec504c53ca332b64963c425395515b01977bd7b3b0
|
||||
/* nTime */ 1603359686,
|
||||
|
|
@ -527,6 +534,17 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
m_assumeutxo_data = MapAssumeutxo{
|
||||
{
|
||||
110,
|
||||
{uint256S("0x4fa9f2be16670cb097173e6b788974fb9106c2335c074267ca5f7fc297dded32"), 110},
|
||||
},
|
||||
{
|
||||
210,
|
||||
{uint256S("0x9c5ed99ef98544b34f8920b6d1802f72ac28ae6e2bd2bd4c316ff10c230df3f2"), 210},
|
||||
},
|
||||
};
|
||||
|
||||
chainTxData = ChainTxData{
|
||||
0,
|
||||
0,
|
||||
|
|
@ -1304,3 +1322,9 @@ void SelectParams(const std::string& network)
|
|||
SelectBaseParams(network);
|
||||
globalChainParams = CreateChainParams(gArgs, network);
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& o, const AssumeutxoData& aud)
|
||||
{
|
||||
o << strprintf("AssumeutxoData(%s, %s)", aud.hash_serialized.ToString(), aud.nChainTx);
|
||||
return o;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue