mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Validation of pegin inputs
This commit is contained in:
parent
f4adb464e8
commit
5cbb014fe4
15 changed files with 369 additions and 79 deletions
|
|
@ -34,6 +34,7 @@ static const char DB_LAST_BLOCK = 'l';
|
|||
|
||||
// ELEMENTS:
|
||||
static const char DB_PEGIN_FLAG = 'w';
|
||||
static const char DB_INVALID_BLOCK_Q = 'q';
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
@ -270,6 +271,14 @@ bool CBlockTreeDB::ReadFlag(const std::string &name, bool &fValue) {
|
|||
return true;
|
||||
}
|
||||
|
||||
// ELEMENTS:
|
||||
bool CBlockTreeDB::ReadInvalidBlockQueue(std::vector<uint256> &vBlocks) {
|
||||
return Read(std::make_pair(DB_INVALID_BLOCK_Q, uint256S("0")), vBlocks);//FIXME: why uint 56 and not ""
|
||||
}
|
||||
bool CBlockTreeDB::WriteInvalidBlockQueue(const std::vector<uint256> &vBlocks) {
|
||||
return Write(std::make_pair(DB_INVALID_BLOCK_Q, uint256S("0")), vBlocks);
|
||||
}
|
||||
|
||||
bool CBlockTreeDB::LoadBlockIndexGuts(const Consensus::Params& consensusParams, std::function<CBlockIndex*(const uint256&)> insertBlockIndex)
|
||||
{
|
||||
std::unique_ptr<CDBIterator> pcursor(NewIterator());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue