vpatch file split hunks

all signers:

antecedents:

press order:

patch:

- A71655BCD21408123E7BE15F91803707BAFCA212787544D3E160855C170D596029847DC35ECD0F4DBE10F8E412BEE114FBA803D4E369C980D06691373106C18D
+ 12AAA6EDCE4F59B929CA6FD4C714E1BE798B42C2293934D0861EE5CB300CC60D0320CBC5F4550FD7ED16AF793E48B6DD84EB762E57EA458D93386CFCC0D45A50
bitcoin/src/bitcoinrpc.cpp
(1851 . 6)(1851 . 50)
5 return false;
6 }
7
8 Value sendrawtransaction(const Array& params, bool fHelp)
9 {
10 if (fHelp || params.size() < 1 || params.size() > 1)
11 throw runtime_error(
12 "sendrawtransaction <hex string>\n"
13 "Submits raw transaction (serialized, hex-encoded) to local node and network.");
14
15 vector<unsigned char> txData(ParseHex(params[0].get_str()));
16 CDataStream ssData(txData, SER_NETWORK, VERSION);
17 CTransaction tx;
18
19 try {
20 ssData >> tx;
21 }
22 catch (std::exception &e) {
23 throw JSONRPCError(-22, "tx decode failed");
24 }
25
26 CTxDB txdb("r");
27 uint256 txHash = tx.GetHash();
28 uint256 hashBlock = 0;
29
30 if (TransactionSeen(txHash, hashBlock))
31 {
32 throw JSONRPCError(-5, string("tx already ") +
33 (hashBlock != 0 ?
34 string("included in block ") + hashBlock.ToString() :
35 "in memory pool"));
36 }
37
38 bool fMissingInputs = false;
39
40 if (!tx.AcceptToMemoryPool(txdb, true, &fMissingInputs) || fMissingInputs)
41 {
42 throw JSONRPCError(-22, string("tx rejected") +
43 (fMissingInputs ? ", missing inputs" : ""));
44 }
45
46 SyncWithWallets(tx, NULL, true);
47 CInv inv(MSG_TX, txHash);
48 RelayMessage(inv, tx);
49
50 return txHash.GetHex();
51 }
52
53 Value eatblock(const Array& params, bool fHelp)
54 {
(1922 . 6)(1966 . 7)
56 make_pair("settxfee", &settxfee),
57 make_pair("getmemorypool", &getmemorypool),
58 make_pair("listsinceblock", &listsinceblock),
59 make_pair("sendrawtransaction", &sendrawtransaction),
60 make_pair("dumpblock", &dumpblock),
61 make_pair("eatblock", &eatblock),
62 };
- 0CCB0C29C0A3217D57F9BC72D87B497E64116A9F79E69277408750EE3DC95738CE52A70AFECE7A1054314100D84F93F6525AB514B8ABD8CE78AB8EBD50E599A2
+ 738EA5D28C72B586790716C124D219B8B132C5224CE07CC3B47EAB4495E2C9009EAE1A7D7FA3FAAA24DE465D5A46201DC1C4A468AB5A891CB59811D328B82084
bitcoin/src/main.cpp
(98 . 6)(98 . 28)
67 return false;
68 }
69
70 // return wether a given transaction is found on mempool or already included in a block
71 bool TransactionSeen(const uint256 &hash, uint256 &hashBlock)
72 {
73 CRITICAL_BLOCK(cs_mapTransactions)
74 if (mapTransactions.count(hash))
75 return true;
76
77 CTransaction tx;
78 CTxDB txdb("r");
79 CTxIndex txindex;
80
81 if (tx.ReadFromDisk(txdb, COutPoint(hash, 0), txindex))
82 {
83 CBlock block;
84 if (block.ReadFromDisk(txindex.pos.nFile, txindex.pos.nBlockPos, false))
85 hashBlock = block.GetHash();
86 return true;
87 }
88
89 return false;
90 }
91
92 // erases transaction with the given hash from all wallets
93 void static EraseFromWallets(uint256 hash)
94 {
(106 . 7)(128 . 7)
96 }
97
98 // make sure all wallets know about the given transaction, in the given block
99 void static SyncWithWallets(const CTransaction& tx, const CBlock* pblock = NULL, bool fUpdate = false)
100 void SyncWithWallets(const CTransaction& tx, const CBlock* pblock, bool fUpdate)
101 {
102 BOOST_FOREACH(CWallet* pwallet, setpwalletRegistered)
103 pwallet->AddToWalletIfInvolvingMe(tx, pblock, fUpdate);
- FF2BF8F8147DD8DF5E1EF1BCEA9B0159D3F83C1E30BEFEF56415B99305AA99161AC1C05EFB48BE87A383FFB6D621FD3761BFB3E4952CA244A6E1398CA3C71DC6
+ 854E85A8217F8386FA7EC13775FDF7271A41A0132816F1A64ACD40904B4B8300491DD368A26648AFB11AF019F0BDCC535CA327C19EACA698803F3AFDD57B76D8
bitcoin/src/main.h
(79 . 6)(79 . 8)
108
109 void RegisterWallet(CWallet* pwalletIn);
110 void UnregisterWallet(CWallet* pwalletIn);
111 void SyncWithWallets(const CTransaction& tx, const CBlock* pblock = NULL, bool fUpdate = false);
112 bool TransactionSeen(const uint256 &hash, uint256 &hashBlock);
113 bool ProcessBlock(CNode* pfrom, CBlock* pblock);
114 bool CheckDiskSpace(uint64 nAdditionalBytes=0);
115 FILE* OpenBlockFile(unsigned int nFile, unsigned int nBlockPos, const char* pszMode="rb");