diff --git a/src/init.cpp b/src/init.cpp index c753198af5..2bb6015e5c 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1425,6 +1425,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) if (!pwalletMain) return false; } + #else // ENABLE_WALLET LogPrintf("No wallet support compiled in!\n"); #endif // !ENABLE_WALLET @@ -1488,6 +1489,12 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) uiInterface.NotifyBlockTip.disconnect(BlockNotifyGenesisWait); } + CBlockIndex *genesis = chainActive.Genesis(); + const CBlock &genesisBlock = Params().GenesisBlock(); + for (unsigned int i = 0; inTx ; i++) { + SyncWithWallets(genesisBlock.vtx[i], genesis, &genesisBlock); + } + // ********************************************************* Step 11: start node if (!strErrors.str().empty()) diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp index eef0b57d10..0190a45d65 100644 --- a/src/policy/policy.cpp +++ b/src/policy/policy.cpp @@ -49,6 +49,8 @@ bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType, const bool w } else if (whichType == TX_NULL_DATA && (!fAcceptDatacarrier || scriptPubKey.size() > nMaxDatacarrierBytes)) return false; + else if (whichType == TX_TRUE) + return false; else if (!witnessEnabled && (whichType == TX_WITNESS_V0_KEYHASH || whichType == TX_WITNESS_V0_SCRIPTHASH)) return false; diff --git a/src/script/ismine.cpp b/src/script/ismine.cpp index 1dbd75ddfc..df8d8884c9 100644 --- a/src/script/ismine.cpp +++ b/src/script/ismine.cpp @@ -5,6 +5,7 @@ #include "ismine.h" +#include "chainparams.h" #include "key.h" #include "keystore.h" #include "script/script.h" @@ -146,6 +147,9 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey, bool& return ISMINE_SPENDABLE; break; } + case TX_TRUE: + if (Params().NetworkIDString() == "betaregtest") + return ISMINE_SPENDABLE; } if (keystore.HaveWatchOnly(scriptPubKey)) { diff --git a/src/script/sign.cpp b/src/script/sign.cpp index 9d0caabfd8..22bef2695a 100644 --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -109,6 +109,9 @@ static bool SignStep(const BaseSignatureCreator& creator, const CScript& scriptP ret.push_back(valtype()); // workaround CHECKMULTISIG bug return (SignN(vSolutions, creator, scriptPubKey, ret, sigversion)); + case TX_TRUE: + return true; + case TX_WITNESS_V0_KEYHASH: ret.push_back(vSolutions[0]); return true; @@ -320,6 +323,7 @@ static Stacks CombineSignatures(const CScript& scriptPubKey, const BaseSignature case TX_NONSTANDARD: case TX_NULL_DATA: case TX_WITHDRAW_LOCK: + case TX_TRUE: // Don't know anything about this, assume bigger one is correct: if (sigs1.script.size() >= sigs2.script.size()) return sigs1; diff --git a/src/script/standard.cpp b/src/script/standard.cpp index c6f6e441b3..cb5b443252 100644 --- a/src/script/standard.cpp +++ b/src/script/standard.cpp @@ -34,6 +34,7 @@ const char* GetTxnOutputType(txnouttype t) case TX_WITNESS_V0_KEYHASH: return "witness_v0_keyhash"; case TX_WITNESS_V0_SCRIPTHASH: return "witness_v0_scripthash"; case TX_WITHDRAW_LOCK: return "withdraw"; + case TX_TRUE: return "true"; } return NULL; } @@ -95,6 +96,11 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector