aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp30
1 files changed, 3 insertions, 27 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index 97f51d296..ae3985485 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -36,9 +36,9 @@
#include <txmempool.h>
#include <ui_interface.h>
#include <undo.h>
-#include <util/system.h>
#include <util/moneystr.h>
#include <util/strencodings.h>
+#include <util/system.h>
#include <validationinterface.h>
#include <warnings.h>
@@ -1455,9 +1455,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
return true;
}
-namespace {
-
-bool UndoWriteToDisk(const CBlockUndo& blockundo, FlatFilePos& pos, const uint256& hashBlock, const CMessageHeader::MessageStartChars& messageStart)
+static bool UndoWriteToDisk(const CBlockUndo& blockundo, FlatFilePos& pos, const uint256& hashBlock, const CMessageHeader::MessageStartChars& messageStart)
{
// Open history file to append
CAutoFile fileout(OpenUndoFile(pos), SER_DISK, CLIENT_VERSION);
@@ -1484,7 +1482,7 @@ bool UndoWriteToDisk(const CBlockUndo& blockundo, FlatFilePos& pos, const uint25
return true;
}
-static bool UndoReadFromDisk(CBlockUndo& blockundo, const CBlockIndex *pindex)
+bool UndoReadFromDisk(CBlockUndo& blockundo, const CBlockIndex* pindex)
{
FlatFilePos pos = pindex->GetUndoPos();
if (pos.IsNull()) {
@@ -1533,8 +1531,6 @@ static bool AbortNode(CValidationState& state, const std::string& strMessage, co
return state.Error(strMessage);
}
-} // namespace
-
/**
* Restore the UTXO in a Coin at a given COutPoint
* @param undo The Coin to be restored.
@@ -3159,26 +3155,6 @@ static int GetWitnessCommitmentIndex(const CBlock& block)
return commitpos;
}
-// Compute at which vout of the block's coinbase transaction the signet
-// signature occurs, or -1 if not found.
-static int GetSignetSignatureIndex(const CBlock& block)
-{
- if (!block.vtx.empty()) {
- for (size_t o = 0; o < block.vtx[0]->vout.size(); o++) {
- if (block.vtx[0]->vout[o].scriptPubKey.size() >= 68 // at minimum 64 byte signature plus script/header data
- && block.vtx[0]->vout[o].scriptPubKey[0] == OP_RETURN // unspendable
- && block.vtx[0]->vout[o].scriptPubKey[1] == block.vtx[0]->vout[o].scriptPubKey.size() - 1 // push the rest
- && block.vtx[0]->vout[o].scriptPubKey[2] == 0xec // 's' ^ 0x9f
- && block.vtx[0]->vout[o].scriptPubKey[3] == 0xc7 // 'i' ^ 0xae
- && block.vtx[0]->vout[o].scriptPubKey[4] == 0xda // 'g' ^ 0xbd
- && block.vtx[0]->vout[o].scriptPubKey[5] == 0xa2) { // 'n' ^ 0xcc
- return (int)o;
- }
- }
- }
- return -1;
-}
-
void UpdateUncommittedBlockStructures(CBlock& block, const CBlockIndex* pindexPrev, const Consensus::Params& consensusParams)
{
int commitpos = GetWitnessCommitmentIndex(block);