Luke Dashjr
3a8029f033
Update nTime after nExtraNonce to avoid potential race
...
(extraNonce being reset due to just-occurred time change after nTime is set)
14 years ago
Gavin Andresen
72e962cf55
getbalance '*' was ignoring minconf param.
14 years ago
Gavin Andresen
9ff411f7f7
Set time locale to POSIX in rfc1123Time so weekday/months in http responses are correct.
14 years ago
Jeff Garzik
17616eac17
Send/return full bitcoin version string in Server and User-Agent HTTP headers
14 years ago
Jeff Garzik
d98beea894
rfc1123Time: increase buffer size for time string
...
Make sure we can accomodate all possibilities.
14 years ago
Gavin Andresen
198fd7b0bd
Report immature coinbase transactions in listtransactions
...
Report coin generation transactions as 'category':'immature' until they have 120 confirmations (when they are reported as 'category':'generate', as before).
If the block they are in is not part of the main chain (you lost a 'block race'), then they are reported as 'category':'orphan' (with 0 confirmations).
14 years ago
Eric Swanson
0a4cb86976
Fixed issue 76 -- RPC error where addresses from addressbook's sending tab appear in listaccounts
14 years ago
Jeff Garzik
6f074b71bb
RPC sendmany must acquire cs_main lock
14 years ago
Jeff Garzik
f5f1878ba1
Fix deadlocks in setaccount, sendfrom RPC calls
...
SendMoney*() now requires caller to acquire cs_main.
GetAccountAddress() now requires caller to acquire cs_main, cs_mapWallet.
Ordering is intended to match these two callchains[1]:
1. CRITICAL_BLOCK(cs_main)
ProcessMessage(pfrom, strCommand, vMsg)
AddToWalletIfMine()
AddToWallet(wtx)
CRITICAL_BLOCK(cs_mapWallet)
2. CRITICAL_BLOCK(cs_main)
ProcessMessage(pfrom, strCommand, vMsg)
AddToWalletIfMine()
AddToWallet(wtx)
CRITICAL_BLOCK(cs_mapWallet)
walletdb.WriteName(PubKeyToAddress(vchDefaultKey), "")
CRITICAL_BLOCK(cs_mapAddressBook)
Spotted by ArtForz. Additional deadlock fixes by Gavin.
[1] http://www.bitcoin.org/smf/index.php?topic=4904.msg71897#msg71897
14 years ago
Gavin Andresen
b931ed8563
sendmany RPC command, to send to multiple recipients in one transaction.
14 years ago
Matt Corallo
c1f74f152b
throw JSONRPCError(-5, "Invalid bitcoin address") instead.
14 years ago
Matt Corallo
279ab5e62f
setaccount should return if an invalid address is provided.
...
This prevents setaccount from creating new accounts which do not have any addresses.
14 years ago
Gavin Andresen
789259d2e7
Do not round input amounts; allow RPC full precision.
14 years ago
Gavin Andresen
83b9f42796
Use ValueFromAmount consistently
14 years ago
Gavin Andresen
47908a8907
Visual C++ compatibility fixes
14 years ago
sandos
8fd402bfcf
Set SO_REUSEADDR for JSON-RPC port
14 years ago
Gavin Andresen
d9574c2f14
Reconcile getbalance and listaccounts 0 in the shared-wallet case
...
If you copied your wallet and used it on two different machines, the balance reported by getbalance and the sum(listaccounts) could disagree, because you might receive payments for an address that is in your wallet but not your address book. Now all such transactions are credited to the default empty-string account.
14 years ago
Gavin Andresen
1d23c74361
ReacceptWalletTransactions bugfix
...
Fix two bugs that can happen if you copy your wallet to another machine
and perform transactions on both.
First, ReacceptWalletTransactions would notice if the other wallet spent coins, and
would correctly mark the receiving transaction spent. However, it did not add the spending
transaction to the wallet. Now it does.
Second, account balances could get out of sync with 'getbalance' because coins received
by the other copy of the wallet were not necessarily detected. Now ReacceptWalletTransactions
will scan the entire blockchain for transactions that should be in the wallet if it runs
across a 'spent in the other wallet' transaction.
Finally, there was a small bug in the accounts getbalance code-- generated coins with between
100 and 119 confirmations were not being counted in the balance of account "".
14 years ago
Gavin Andresen
fa446a563e
Fix setaccount/getaccountaddress interaction bug
...
See https://github.com/bitcoin/bitcoin/issues#issue/29
14 years ago
Gavin Andresen
2eb09b66ef
Fix so listaccounts with minconf works.
14 years ago
Gavin Andresen
80be6e69a9
Add account/address details to gettransaction output
14 years ago
Gavin Andresen
f86655fddd
Add time to category:move transactions.
14 years ago
Gavin Andresen
ddb68acebe
Add address to listtransactions output
14 years ago
gavinandresen
1c0bf23ba2
Missed a int64_t cast when I added transaction time output
...
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@205 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
gavinandresen
59948a6e1c
listtransactions was reporting address instead of account for 'receive'
...
setgenerate true 0 is now the same as setgenerate false
And return transaction time
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@204 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
gavinandresen
809ee79592
New RPC command: listaccounts. New RPC setting -rpctimeout. And listtransactions '*'
...
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@203 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
s_nakamoto
986b5e257e
correction
...
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@200 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
s_nakamoto
97ee01ad89
added some DoS limits, removed safe mode
...
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@199 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
gavinandresen
bdde31d787
All boolean options/flags now work the same way.
...
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@194 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
gavinandresen
bfd471f53e
JSON methods: listtransactions, gettransaction, move, sendfrom and getbalance <account>
...
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@193 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
s_nakamoto
24324d83e8
-- version 0.3.17 release
...
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@191 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
s_nakamoto
b7ccd48dd8
still working on account-based commands getbalance, move and sendfrom, they're only for testing for now
...
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@190 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
s_nakamoto
776d0f3459
new getwork
...
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@189 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
gavinandresen
e4ff4e6898
Depracate "label" API, replacing with account
...
New RPC methods: move, sendfrom
Change to getbalance (now takes optional [account] argument)
Renamed methods with "label" in their names.
sendtoaddress returns hexadecimal transaction ID instead of "sent".
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@188 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
gavinandresen
838e8c9166
Add paytxfee to getinfo output
...
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@178 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
s_nakamoto
c891967b6f
bugfixes from Dean Gores,
...
addr system changes,
make sure no gen before block 74000
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@173 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
gavinandresen
c285051c08
testnet and keypoololdest added to RPC getinfo output. And RPC now sends proper HTTP Date headers.
...
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@172 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
gavinandresen
2ea5fa0710
validateaddress RPC command
...
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@169 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
gavinandresen
ed54768f5f
-rpcssl=1 option, allowing secure HTTPS JSON-RPC connections on OSX/Unix.
...
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@165 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
s_nakamoto
103849419a
key pool for safer wallet backup
...
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@163 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
s_nakamoto
efae3da41d
config option -rpcallowip= to accept json-rpc connections from another machine
...
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@155 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
s_nakamoto
fe37c35018
config option -rpcallowip= to accept json-rpc connections from another machine
...
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@155 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
s_nakamoto
d743f03552
Gavin Andresen: json-rpc return standard error objects with error code numbers,
...
json-rpc command line client return exit code,
added rpc backupwallet command
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@147 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
s_nakamoto
0a61b0df12
propset svn:eol-style native
...
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@146 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
Satoshi Nakamoto
d3631907d6
change switch name to -disablesafemode
14 years ago
Satoshi Nakamoto
87cfcfd374
more rpc methods allowed in safe mode
14 years ago
Satoshi Nakamoto
522dfe3422
alert system
...
-- version 0.3.11
14 years ago
Satoshi Nakamoto
c545563d46
warning message if clock is too far off
14 years ago
s_nakamoto
2ef9cfa5b8
change switch name to -disablesafemode
...
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@144 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago
s_nakamoto
7d7797b141
more rpc methods allowed in safe mode
...
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@143 1a98c847-1fd6-4fd8-948a-caf3550aa51b
14 years ago