Commit graph

117 commits

Author SHA1 Message Date
Jonas Schnelli 3df0411ad9 remove JSON Spirit UniValue wrapper 2015-06-04 09:16:06 +02:00
Jonas Schnelli 6c7bee0624 expicit set UniValue type to avoid empty values 2015-06-04 09:16:05 +02:00
Jonas Schnelli 53b4671a9d extend conversion to UniValue 2015-06-04 09:16:05 +02:00
Jeff Garzik 15982a8b69 Convert tree to using univalue. Eliminate all json_spirit uses. 2015-06-04 09:16:05 +02:00
jtimon da29ecbcc6 Consensus: MOVEONLY: Move CValidationState from main consensus/validation 2015-05-15 16:05:28 +02:00
dexX7 8ac2a4e178
RPC: show script verification errors in "signrawtransaction" result
If there are any script verification errors, when using "signrawtransaction", they are shown in the RPC result:

```
// ...

Result:
{
  "hex" : "value",           (string) The hex-encoded raw transaction with signature(s)
  "complete" : true|false,   (boolean) If the transaction has a complete set of signatures
  "errors" : [                 (json array of objects) Script verification errors (if there are any)
    {
      "txid" : "hash",           (string) The hash of the referenced, previous transaction
      "vout" : n,                (numeric) The index of the output to spent and used as input
      "scriptSig" : "hex",       (string) The hex-encoded signature script
      "sequence" : n,            (numeric) Script sequence number
      "error" : "text"           (string) Verification or signing error related to the input
    }
    ,...
  ]
}
```
2015-05-05 09:40:55 +02:00
Pieter Wuille de8e801d3f Report missing inputs in sendrawtransaction 2015-04-28 07:16:39 -07:00
Matt Corallo 59ed61b389 Add RPC call to generate and verify merkle blocks 2015-04-23 17:50:39 -07:00
charlescharles 0b2f93091f Fix docs for 'complete' field in 'signrawtransaction' response 2015-04-20 13:29:20 +02:00
Jonas Schnelli 0b9dc9c8f5 [move] move listunspent to wallet/rpcwallet.cpp 2015-04-12 17:56:32 +02:00
Jonas Schnelli 50c72f23ad [Move Only] Move wallet related things to src/wallet/
could once be renamed from /src/wallet to /src/legacywallet.
2015-03-12 14:13:02 +01:00
Wladimir J. van der Laan 87ecfb0f96
Merge pull request #5711
5ebe095 Trim RPC command table (Wladimir J. van der Laan)
4401b2d Removed main.h dependency from rpcserver.cpp (Eric Lombrozo)
2015-02-04 10:23:09 +01:00
Pieter Wuille 9fddceda44 Avoid storing a reference passed to SignatureChecker constructors 2015-02-02 20:19:46 -08:00
Pieter Wuille 858809a33e Use separate SignatureChecker for CMutableTransaction 2015-02-02 20:19:12 -08:00
Eric Lombrozo 4401b2d7c5 Removed main.h dependency from rpcserver.cpp
Rebased by @laanwj:

- update for RPC methods added since 84d13ee: setmocktime,
  invalidateblock, reconsiderblock. Only the first, setmocktime, required a change,
  the other two are thread safe.
2015-01-28 07:41:54 +01:00
Wladimir J. van der Laan 2511a39cca
Merge pull request #5575
7b782f5 RPCWallet: Notate all account stuff as deprecated (Luke Dashjr)
2015-01-26 12:38:22 +01:00
Wladimir J. van der Laan 729ba31749
Merge pull request #5513
856e862 namespace: drop most boost namespaces and a few header cleanups (Cory Fields)
9b1ab86 namespace: drop boost::assign altogether here (Cory Fields)
a324199 namespace: remove boost namespace pollution (Cory Fields)
2015-01-06 20:32:45 +01:00
Wladimir J. van der Laan 4f1524966a Replace direct use of 0 with SetNull and IsNull
Replace x=0 with .SetNull(),
x==0 with IsNull(), x!=0 with !IsNull().
Replace uses of uint256(0) with uint256().
2015-01-05 15:45:34 +01:00
Cory Fields 856e862f4a namespace: drop most boost namespaces and a few header cleanups
A few boost::asio were left around because they're very wordy otherwise.
2015-01-02 15:12:03 -05:00
Cory Fields a3241998e1 namespace: remove boost namespace pollution 2015-01-02 15:12:03 -05:00
Luke Dashjr 7b782f5b01 RPCWallet: Notate all account stuff as deprecated 2014-12-30 14:46:57 +00:00
sandakersmann f914f1a746
Added "Core" to copyright headers
Github-Pull: #5494
Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
2014-12-19 19:55:32 +01:00
Philip Kaufmann 27df4123c4 make all catch() arguments const
- I saw this on http://en.cppreference.com/w/cpp/language/try_catch and
  thought it would be a good idea
- also unify used format to better be able to search for exception
  uses in our codebase
2014-12-17 09:39:24 +01:00
Pavel Janík aa768f1848 signrawtransaction: validate private key. 2014-12-11 16:06:23 +01:00
Luke Dashjr d227011184 MOVEONLY: core/ -> primitives/ 2014-12-03 10:52:58 +00:00
Michael Ford 72fb3d295a Update comments in src/rpc* to be doxygen compatible 2014-11-20 10:19:39 +08:00
jtimon 4a3587d8db MOVEONLY: Separate CTransaction and dependencies from core 2014-10-27 13:54:37 +01:00
Cory Fields 066e2a1403 script: move CScriptID to standard.h and add a ctor for creating them from CScripts
This allows for a reversal of the current behavior.

This:
CScript foo;
CScriptID bar(foo.GetID());

Becomes:
CScript foo;
CScriptID bar(foo);

This way, CScript is no longer dependent on CScriptID or Hash();
2014-10-17 13:44:14 -04:00
Pieter Wuille d4a42334d4
Merge pull request #4834
7c70438 Get rid of the dummy CCoinsViewCache constructor arg (Pieter Wuille)
ed27e53 Add coins_tests with a large randomized CCoinViewCache test. (Pieter Wuille)
058b08c Do not keep fully spent but unwritten CCoins entries cached. (Pieter Wuille)
c9d1a81 Get rid of CCoinsView's SetCoins and SetBestBlock. (Pieter Wuille)
f28aec0 Use ModifyCoins instead of mutable GetCoins. (Pieter Wuille)
2014-10-08 14:58:16 -07:00
Wladimir J. van der Laan 3eaa9462f8
Merge pull request #5047
3e61eb9 minor txindex documentation improvement (Cozz Lovan)
2014-10-07 10:17:05 +02:00
Cozz Lovan 3e61eb9c51 minor txindex documentation improvement 2014-10-06 18:52:51 +02:00
Pieter Wuille e790c370b5 Replace SCRIPT_VERIFY_NOCACHE by flag directly to checker 2014-10-02 20:26:58 +02:00
Mark Friedenbach a372168e77 Use a typedef for monetary values 2014-09-26 15:42:04 -07:00
Pieter Wuille 7c70438dc6 Get rid of the dummy CCoinsViewCache constructor arg 2014-09-24 03:19:04 +02:00
Pieter Wuille f28aec014e Use ModifyCoins instead of mutable GetCoins.
Replace the mutable non-copying GetCoins method with a ModifyCoins, which
returns an encapsulated iterator, so we can keep track of concurrent
modifications (as iterators can be invalidated by those) and run cleanup
code after a modification is finished.

This also removes the overloading of the 'GetCoins' name.
2014-09-23 22:29:12 +02:00
Wladimir J. van der Laan 438c7e4cd2
Merge pull request #4555
6dcfda2 Don't pass nHashType to EvalScript nor CheckSig (jtimon)
2b23a87 Don't pass nHashType to VerifyScript (jtimon)
ce3649fb Remove CScriptCheck::nHashType (was always 0) (jtimon)
358562b Remove unused function main:VerifySignature (jtimon)
2014-09-17 13:44:22 +02:00
Pieter Wuille 0be990ba34 Move CTxDestination from script/script to script/standard 2014-09-16 19:14:32 +02:00
Pieter Wuille 7388b74cd2
Merge pull request #4911
611116d header include cleanup (Philip Kaufmann)
2014-09-16 04:12:52 +02:00
ENikS ec91092df8
Fixing compiler warning C4101
Github-Pull: #4856
2014-09-15 14:35:32 +02:00
Philip Kaufmann 611116d4e3 header include cleanup
- ensures alphabetical ordering for includes etc. in source file headers
2014-09-14 12:43:56 +02:00
jtimon 2b23a87599 Don't pass nHashType to VerifyScript 2014-09-12 20:04:31 +02:00
Pieter Wuille f7cdcb80ab
Merge pull request #4822
629d75f Combine CCoinsViewCache's HaveCoins and const GetCoins into AccessCoins. (Pieter Wuille)
2014-09-10 01:44:30 +02:00
jtimon e088d65acb Separate script/sign 2014-09-08 20:21:35 +02:00
jtimon c4408a6c85 Separate script/standard 2014-09-08 20:21:35 +02:00
Pieter Wuille 145d5be896 Introduce BlockMap type for mapBlockIndex 2014-09-04 02:04:51 +02:00
Pieter Wuille 629d75faac Combine CCoinsViewCache's HaveCoins and const GetCoins into AccessCoins.
The efficient version of CCoinsViewCache::GetCoins only works for known-to-exist
cache entries, requiring a separate HaveCoins call beforehand. This is
inefficient as both perform a hashtable lookup.

Replace the non-mutable GetCoins with AccessCoins, which returns a potentially-NULL
pointer. This also decreases the overloading of GetCoins.

Also replace some copying (inefficient) GetCoins calls with equivalent AccessCoins,
decreasing the copying.
2014-09-03 14:24:52 +02:00
Cozz Lovan 0d27dad845 Clean-up SyncWithWallets/SyncTransaction 2014-08-17 17:39:30 +02:00
Jeff Garzik 3ce7e669e3 bitcoin-cli, rpcrawtransaction: harmonize "{" styling 2014-07-29 11:13:27 -04:00
Jeff Garzik ae775b5b31 Consolidate CTransaction hex encode/decode into core_io.h, core_{read,write}.cpp 2014-07-29 11:13:27 -04:00
Zak Wilcox 6265ecc87f Clarify that redeemScript is often optional 2014-07-12 09:21:02 +01:00