Miguel Freitas
a32bfec78f
sugestion: add language to the spam message text
2013-09-20 19:56:59 -03:00
Miguel Freitas
2e1c79a4c8
setspammsg rpc
2013-09-20 19:51:56 -03:00
Miguel Freitas
5e68d4e2ae
new getposts rpc
2013-09-20 18:59:31 -03:00
Miguel Freitas
875aa4095f
new dhtput to keep track of RTs
2013-09-19 17:35:22 -03:00
Miguel Freitas
460be48e63
rpc cleanups
2013-09-19 07:23:54 -03:00
Miguel Freitas
198c85f8ae
newrtmsg command working. requires original post json object "v" (containing userpost/sig_userpost)
2013-09-18 23:09:51 -03:00
Miguel Freitas
2246f67f99
implement RT signature checking
2013-09-18 21:57:37 -03:00
Miguel Freitas
98903d5a73
keep track of last "have" for each torrent
2013-09-18 08:47:26 -03:00
Miguel Freitas
cefb94e321
allow bitfield with different number of pieces
2013-09-17 07:24:27 -03:00
miguel
ef084487f4
fix torrent/swarm path and add resume file
2013-09-03 07:08:07 -03:00
miguel
f422868103
implement sending message to mention, hashtags, repliesXX and postXX
2013-08-30 14:01:57 -03:00
miguel
b9c5b90e4d
error handling in newpostmsg and newdirectmsg implemented
2013-08-20 21:08:18 -03:00
miguel
5112e73a07
newpostmsg command, working.
2013-08-20 12:18:03 -03:00
miguel
4f51727c1b
use bitcoin network time reference, dm creation draft
2013-08-18 22:01:36 -03:00
miguel
07b165d5f3
first draft of createSignedUserpost
2013-08-18 21:05:23 -03:00
miguel
cc2588ae41
refactoring acceptSignedPost
2013-08-18 20:33:54 -03:00
miguel
6b9c27048e
partial untested torrent chages. will use leveldb for storage, no more multi-files per torrent, number of pieces may increase.
2013-08-17 20:12:44 -03:00
Miguel Freitas
7af7927f5d
some more debuging to make sure new dht announce x torrent peers is working
2013-08-11 21:45:45 -03:00
Miguel Freitas
4513fee3e5
use the right torrent port from the start, not need to change it later
2013-08-11 20:41:47 -03:00
Miguel Freitas
d6215c7c9f
do not add unknown torrents (unkown user)
2013-08-11 19:53:45 -03:00
Miguel Freitas
24fd6a6a8a
start torrent automatically for neighbor of tracker
2013-08-11 19:45:29 -03:00
Miguel Freitas
82ea843b46
make block signature compatible with the rest
2013-08-09 10:14:43 -03:00
Miguel Freitas
396b46914e
convert encryption api to use std::string
2013-08-09 07:41:46 -03:00
Miguel Freitas
f6639dd11b
include implementation for ECIES (ECC + AES + SHA) for asymetric encryption
2013-08-09 00:12:16 -03:00
Miguel Freitas
2aa71205d4
possiblyNeighbor is authoritative for false, so we may trust it to NOT store putData value.
...
someone might be trying to attack this resource by storing value into non-final nodes.
2013-08-08 13:55:45 -03:00
Miguel Freitas
4154a37a14
add support to detect when our node is neighbor of a special resource (eg. torrent tracker)
2013-08-07 23:17:09 -03:00
Miguel Freitas
a35cdef738
dht_reply_data_done_alert to unlock client waiting for data
2013-08-07 22:47:34 -03:00
Miguel Freitas
3a1d772643
improve dht node added from bitcoin network peers
2013-08-07 20:20:03 -03:00
Miguel Freitas
dea237d2ed
implement dht_get_data_alert to detect when we are neighbor of a certain request
2013-08-07 17:40:16 -03:00
Miguel Freitas
8ed88a6eb3
dhtget/dhtput threadsafe
2013-08-07 08:43:50 -03:00
Miguel Freitas
dc36efaa1e
convert entry to json
2013-08-06 23:30:09 -03:00
Miguel Freitas
f55f1cceb9
return dhtget data to json
2013-08-06 20:02:45 -03:00
Miguel Freitas
621812c69e
improve parameter checking in dhtput
2013-08-06 18:26:53 -03:00
Miguel Freitas
830a02c009
dht get/put kind of working. with json interface. amazing.
2013-08-05 22:33:38 -03:00
Miguel Freitas
b9ebeb9675
try to bootstrap dht nodes from bitcoin network
2013-08-04 22:59:20 -03:00
Miguel Freitas
4c92f24620
fixes to dht server and test_dht
2013-08-04 18:26:45 -03:00
Miguel Freitas
8b3368da1f
draft for dht putdata
2013-08-04 16:16:36 -03:00
Miguel Freitas
78e97ac9dc
use the same message magic everywhere (to hash)
2013-08-04 11:36:44 -03:00
Miguel Freitas
2bd0f7de12
first draft of transversal algo to get data from dht
2013-08-04 00:17:52 -03:00
Miguel Freitas
0f91f9e867
proper libtorrent stop, session save
2013-08-02 00:43:04 -03:00
Miguel Freitas
187904d1e8
create new twister.cpp with libtorrent initialization
2013-08-01 20:05:00 -03:00
Miguel Freitas
71e0da6705
initialize libtorrent session with external ip set
2013-08-01 17:05:37 -03:00
Miguel Freitas
fb00bb154e
first hack compiling bitcoind (twister) + libtorrent
2013-07-31 09:05:12 -03:00
Miguel Freitas
78ba2a5609
another big wallet cleanup
2013-07-25 12:06:56 -03:00
Miguel Freitas
9946d6ed72
mining fixes: add salt to instance and use correct username for signing
2013-07-25 12:06:18 -03:00
Miguel Freitas
f2699c4753
rpcwallet cleanups
2013-07-25 11:26:26 -03:00
Miguel Freitas
927aad13a5
send transation of a new user created in wallet
2013-07-25 10:45:42 -03:00
Miguel Freitas
ad712d5006
fix wrongly erasing of indextx with checklevel==3
2013-07-25 10:43:06 -03:00
Miguel Freitas
f764674865
create/list users in wallet
2013-07-25 09:36:57 -03:00
Miguel Freitas
1c42569648
wallet rpc with username
2013-07-25 08:47:35 -03:00
Miguel Freitas
76f8a901a7
removing stuff
2013-07-24 20:28:23 -03:00
Miguel Freitas
fe57966e05
starting wallet cleanup. added username, renamed to twisterwallet.dat
2013-07-24 19:50:37 -03:00
Miguel Freitas
26bbd5614f
remove GetCoins/SetCoins
2013-07-24 18:23:05 -03:00
Miguel Freitas
fe01fd01cb
create CScript overload for << string
2013-07-24 16:22:18 -03:00
Miguel Freitas
4d43b4a6f0
fix CreateSpamMsgTx signing (GetHash on CHashWriter cannot be used twice)
2013-07-24 16:08:25 -03:00
Miguel Freitas
b05742d7f9
sign/verify test - not working
2013-07-22 08:47:46 -03:00
Miguel Freitas
84f796be7f
fix EraseTxIndex usage
2013-07-21 18:39:20 -03:00
Miguel Freitas
6e1c42e963
tx accepted!
2013-07-20 23:58:56 -03:00
Miguel Freitas
2fa9731108
remove stuff, improve TxToJSON
2013-07-20 20:26:21 -03:00
Miguel Freitas
a6ff5511fa
test invalid userhash (might be an invalid tx received from network)
2013-07-20 20:00:30 -03:00
Miguel Freitas
d9fdca340c
implement CScript => string extraction, check username constraits, improve username hash
2013-07-20 19:54:48 -03:00
Miguel Freitas
623b80c061
fix missing nHeight field
2013-07-20 16:56:02 -03:00
Miguel Freitas
7fd4a9f585
twister initial printf
2013-07-20 15:42:47 -03:00
Miguel Freitas
4f8b11b070
renamed binary to twisterd
2013-07-20 15:39:36 -03:00
Miguel Freitas
6ff04a0de2
fix genesis block hash
2013-07-20 15:35:57 -03:00
Miguel Freitas
0b753e0ce2
add nHeight to header for mining (a couple of offsets need +4 to work again)
2013-07-19 20:18:55 -03:00
Miguel Freitas
05c7d3f27d
fix/improve printf of created tx
2013-07-19 19:54:37 -03:00
Miguel Freitas
1556e436c5
fix -datadir inicialization and debug log
2013-07-19 19:32:57 -03:00
Miguel Freitas
1c4f457312
remove stuff
2013-07-19 16:50:30 -03:00
Miguel Freitas
c13ab7e5d5
comment how/where tx userhashes are checked upon block acceptance
2013-07-19 16:39:12 -03:00
Miguel Freitas
d66994d0f0
new function to create spam message
2013-07-19 16:31:56 -03:00
Miguel Freitas
311b1d7eaa
use txIndex instead of coins to keep track of commited tx
2013-07-19 01:00:06 -03:00
Miguel Freitas
4652b9f01b
mempool/cinv now indexed by userhash (all tx must be indexed by userhash btw)
2013-07-19 00:00:59 -03:00
Miguel Freitas
b0716cdc3d
fTxIndex always true in twister
2013-07-18 18:42:22 -03:00
Miguel Freitas
16a28fc9e9
some notes
2013-07-18 18:36:32 -03:00
miguel
2353123580
remove vtxPrev
2013-07-18 14:51:51 -03:00
Miguel Freitas
7f12546f84
change hash(tx) to hash(username) in ccoins
...
hash(tx) does not insure uniqueness of username
2013-07-17 18:38:03 -03:00
Miguel Freitas
878d15160f
ccoins is now the register element database
2013-07-17 17:48:29 -03:00
Miguel Freitas
d0e83d8803
add spammessage and sign it (untested)
2013-07-17 17:11:14 -03:00
Miguel Freitas
7a47376e40
removing stuff
2013-07-17 15:23:47 -03:00
Miguel Freitas
e70fafc0f9
removing stuff
2013-07-17 15:09:13 -03:00
Miguel Freitas
943bff5921
orphaned tx makes no sense anymore
2013-07-17 14:46:43 -03:00
Miguel Freitas
3cc155526a
block creation
2013-07-16 23:53:02 -03:00
Miguel Freitas
97ba3b787c
cleaning block/tx checking
2013-07-16 23:36:25 -03:00
Miguel Freitas
41f5e9f846
remove code
2013-07-16 22:19:06 -03:00
Miguel Freitas
27ee7c328b
add and verify proof of work in tx. remove some old stuff.
2013-07-16 21:46:36 -03:00
Miguel Freitas
0e863844ed
reenable rate limit on tx
2013-07-16 08:59:35 -03:00
Miguel Freitas
5018edc8ca
remove txfee
2013-07-16 08:46:22 -03:00
Miguel Freitas
2718ee55bf
make genesis block valid and disable gui
2013-07-16 01:11:02 -03:00
Miguel Freitas
9cb71491a6
adds userName to transaction
2013-07-15 21:10:28 -03:00
Miguel Freitas
73e1f33dc8
removed vin and vout from CTransaction
...
genesis block broken
2013-07-15 20:14:57 -03:00
Pieter Wuille
fb83a79b21
Fix minor backward incompatibility
...
The key refactor changed the way unencrypted private keys with compressed
public key are stored in the wallet. Apparently older versions relied on
this to verify the correctness of stored keys.
Note that earlier pre-release versions do risk creating wallets that can
not be opened by 0.8.3 and earlier.
2013-07-13 12:57:19 +02:00
Jeff Garzik
d598872726
Merge pull request #2743 from jgarzik/reject-reason
...
Log reason for non-standard transaction rejection
2013-07-10 08:50:49 -07:00
Jeff Garzik
3b837d5679
Merge pull request #2812 from jgarzik/rpcbestblock
...
RPC: add getbestblockhash, to return tip of best chain
2013-07-10 08:49:50 -07:00
Gregory Maxwell
204b8af6dc
Merge pull request #2796 from gmaxwell/remove_overactive_rand_tests
...
Make the rand tests determinstic.
2013-07-07 10:09:03 -07:00
Gregory Maxwell
e5c4dfdfc0
Make the rand tests determinstic. ( fixes #2714 )
...
This avoids spurious errors with the old tests but still tests
enough that if the rng is replaced with a totally broken one
it should still fail.
2013-07-07 09:54:47 -07:00
Jeff Garzik
091aa8dae9
RPC: add getbestblockhash, to return tip of best chain
2013-07-03 11:02:29 -04:00
Pieter Wuille
21cc8bdcbe
Fix build date for from-tarball builds
2013-06-29 14:16:50 +02:00
Pieter Wuille
a4f43075d6
Merge pull request #2793 from Diapolo/translations
...
translation update 2013-06-25
2013-06-26 15:02:28 -07:00
Pieter Wuille
1f2d739ac1
Merge pull request #2174 from CodeShark/sync_macro_clarification
...
Added comments to sync.h to make it easier to understand the macros
2013-06-26 10:51:33 -07:00
Eric Lombrozo
042da8bc0d
Added comments to sync.h to make it easier to understand the macros
2013-06-25 16:54:58 -07:00
Pieter Wuille
4ad73c6b08
Merge pull request #2209 from CodeShark/WalletRegistrationLocks
...
Wallet registration locks in main.cpp + UnregisterAllWallet() function
2013-06-25 16:33:16 -07:00
Jeff Garzik
481d899794
Merge pull request #2792 from sipa/coreimpl
...
Move core implementations to core.cpp
2013-06-25 11:52:18 -07:00
Peter Todd
c40a5aaaf4
Truncate oversize 'tx' messages before relaying/storing.
...
Fixes a memory exhaustion attack on low-memory peers.
2013-06-25 10:37:50 -04:00
Gavin Andresen
2e01ec3207
Merge pull request #2679 from vhf/patch-1
...
Too many bitcoins allowed as amount. (Issue #2401 )
2013-06-25 06:47:53 -07:00
Philip Kaufmann
dae158132d
translation update 2013-06-25
...
- updates bitcoinstrings.cpp and bitcoin_en.ts so new translations can be
made on Transifex
2013-06-25 11:31:29 +02:00
Pieter Wuille
f121db58e4
Move core implementations to core.cpp
2013-06-25 10:33:29 +02:00
Eric Lombrozo
e6fe8e77fb
Calling UnregisterAllWallets() instead of UnregisterWallet(pwalletMain) in init.cpp
2013-06-24 09:33:15 -07:00
Eric Lombrozo
e5cefb9be1
Added locks on the setpwalletRegistered functions in main.cpp and added an UnregisterAllWallets function.
2013-06-24 09:25:23 -07:00
Jeff Garzik
79f6925fac
main.h->core.h include dependency improvements.
2013-06-24 10:41:16 -04:00
Jeff Garzik
396485b14d
Merge pull request #2789 from sipa/overdump
...
Dump addresses every 15 minutes instead of 10 seconds
2013-06-24 07:32:20 -07:00
Pieter Wuille
c43da3f183
Dump addresses every 15 minutes instead of 10 seconds
2013-06-24 11:48:14 +02:00
Eric Lombrozo
33944573ca
Moved CBlock from main.h to core.h
2013-06-23 19:59:35 -07:00
Eric Lombrozo
2a4d3464fd
Pulled AcceptBlock out of CBlock.
2013-06-23 19:59:35 -07:00
Eric Lombrozo
38991ffa8a
Pulled CheckBlock out of CBlock.
2013-06-23 19:59:35 -07:00
Eric Lombrozo
1959997afb
Pulled AddToBlockIndex out of CBlock.
2013-06-23 19:59:35 -07:00
Eric Lombrozo
f3ae51dcce
Pulled ConnectBlock out of CBlock.
2013-06-23 19:59:35 -07:00
Eric Lombrozo
5c363ed622
Pulled DisconnectBlock out of CBlock.
2013-06-23 19:59:34 -07:00
Eric Lombrozo
8031399494
Moved ReadBlockFromDisk implementation to main.cpp
2013-06-23 19:59:34 -07:00
Eric Lombrozo
7db120d531
Moved CBlock::ReadFromDisk out of CBlock to functions ReadBlockFromDisk in main.h
2013-06-23 19:59:34 -07:00
Eric Lombrozo
226f821942
Moved WriteBlockToDisk implementation from main.h to main.cpp
2013-06-23 19:59:32 -07:00
Eric Lombrozo
a6dba0fdb2
Moved CBlock::WriteToDisk out of CBlock to inline function WriteBlockToDisk in main.h
2013-06-23 19:58:23 -07:00
Pieter Wuille
fd967fed89
Merge pull request #2783 from sipa/newtxindex
...
Initialize database before checking changed txindex
2013-06-23 15:49:08 -07:00
Pieter Wuille
ee4949794b
Merge pull request #2592 from sipa/dumpwallet
...
Add dumpwallet and importwallet RPC commands
2013-06-23 12:10:17 -07:00
Philip Kaufmann
336a53ddbc
fix makefiles and init.cpp after chainparams merge
...
- add missing chainparams.o to some makefiles
- remove a double-include of chainparams.h in init.cpp
2013-06-23 17:39:39 +02:00
Jeff Garzik
4be2aba302
Merge pull request #2778 from jgarzik/rpc-verifydb
...
RPC: add 'verifychain' to verify chain database at runtime
2013-06-22 23:08:13 -07:00
Jeff Garzik
980bfe6ef8
Log reason for non-standard transaction rejection
2013-06-23 02:05:25 -04:00
Pieter Wuille
b4a8a326c0
Merge pull request #2660 from TheBlueMatt/gmfrefactor
...
Refactor fee rules to make them actually readable.
2013-06-22 10:08:57 -07:00
Pieter Wuille
48628fd98c
Merge pull request #2765 from vobornik/master
...
recognize Debian kFreeBSD port by build_detect_platform script
2013-06-22 10:05:18 -07:00
Pieter Wuille
4e534aa9d8
Add dumpwallet and importwallet RPCs
...
dumpwallet: produce a dump of all keys in a wallet, in a format
compatible with Bitcoin Wallet for Android and Multibit.
importwallet: import such a dump
2013-06-22 17:30:56 +02:00
Pieter Wuille
434e4273b9
Add GetKeyBirthTimes to wallet
...
Compute safe lower bounds on the birth times of all wallet keys. For
pool keys or keys with metadata, the actually stored birth time is
used. For all others, the birth times are inferred from the wallet
transactions.
2013-06-22 17:30:56 +02:00
Pieter Wuille
acc775c554
Add ExtractAffectedKeys to script
...
This function finds all keys affected by a particular output script,
supporting everything ExtractDestinations supports (pay-to-pubkey,
pay-to-pubkeyhash, multisig) and recurses into subscripts (P2SH).
2013-06-22 16:49:30 +02:00
Pieter Wuille
067a6092ac
Initialize database before checking changed txindex
...
In case no database exists yet, and -txindex(=1) is passed, we currently first
check whether fTxIndex differs from -txindex (and ask the user to reindex in
that case), and only afterwards initialize the database. By swapping these
around (the initialization is a no-op in case the database already exists),
we allow it to be born in txindex mode, without warning.
That also means we don't need to check -reindex anymore, as the wiping/reinit
of the databases happens before checking.
2013-06-22 16:14:26 +02:00
Pieter Wuille
01b45731b7
Merge pull request #2632 from mikehearn/chainparams
...
Refactor chain-specific tweaks into a CChainParams class and introduce a regtest mode
2013-06-22 06:56:14 -07:00
Pieter Wuille
4addb2c066
Refactor keytime/metadata and wallet encryption bugfix
...
Refactor keytime:
* Key metadata is kept in a CWallet::mapKeyMetadata (std::map<CKeyId,CKeyMetadata>).
* When generating a new key, time is put in that map, and new key is written.
* AddKeyPubKey and AddCryptedKey do not take a creation time argument, but instead
pull it from that map, if it exists there.
Bugfix:
* AddKeyPubKey and AddCryptedKey in CWallet didn't override the CKeyStore
definition anymore. This is fixed, as they no longed need the nCreationTime
argument now.
Also a few related other changes:
* Metadata can be overwritten.
* Only GenerateNewKey calls GetTime(), as it's the only place where we know for
sure a key was not constructed earlier.
* When the nTimeFirstKey is known to be inaccurate, it is set to the value 1
(instead of 0, which would mean unknown).
* Use CPubKey instead of std::vector<unsigned char> where possible.
2013-06-20 01:31:18 +02:00
Jeff Garzik
f590653377
RPC: add 'verifychain', to verify chain database at runtime
2013-06-19 11:53:02 -04:00
Jeff Garzik
168ba99392
Pass check level, check depth to VerifyDB()
2013-06-19 11:32:49 -04:00
Mike Hearn
0e4b317555
Introduce a CChainParameters singleton class and regtest mode.
...
The new class is accessed via the Params() method and holds
most things that vary between main, test and regtest networks.
The regtest mode has two purposes, one is to run the
bitcoind/bitcoinj comparison tool which compares two separate
implementations of the Bitcoin protocol looking for divergence.
The other is that when run, you get a local node which can mine
a single block instantly, which is highly convenient for testing
apps during development as there's no need to wait 10 minutes for
a block on the testnet.
2013-06-19 16:28:52 +02:00
Mike Hearn
70e7fba06d
Move implementation of some CBlockLocator methods
...
Move out of main.h to improve compile times and add documentation
for what the methods do.
2013-06-19 15:39:45 +02:00
Jeff Garzik
25dbb92860
Merge pull request #2760 from cozz/cozz2
...
fix comment about dust logic
2013-06-18 06:23:58 -07:00
Pieter Wuille
5e6f7cc8ad
Merge pull request #2763 from bitsofproof/master
...
Send tx relay flag with version message
2013-06-17 01:43:11 -07:00
Pieter Wuille
e58154c447
Merge pull request #2648 from Diapolo/txindex
...
allow txindex to be removed and add a reindex dialog
2013-06-15 07:49:40 -07:00
Pieter Wuille
f5442aeef4
Merge pull request #2766 from theuni/fix-shutdown-deadlock
...
Fix shutdown deadlock, ticket #2690
2013-06-15 07:40:35 -07:00
Matt Corallo
87cce04c17
Refactor fee rules to make them actually readable.
...
This (nearly) doesn't change fee rules at all:
* To make it into the fee transaction area, the dPriority comparison
changed from < to <=
* We now just ignore transactions > MAX_BLOCK_SIZE/4 instead of
doing some calculations to require increasingly large fees as
size increases.
2013-06-14 13:37:43 +02:00
theuni
e2654c8d28
fixed: don't use thread::sleep_for where it's known to be broken
...
Fixes #2690 .
2013-06-14 00:01:57 -04:00
theuni
f2763d6d60
fixed: include boost header as necessary
...
Without this include, sometimes BOOST_VERSION was defined and sometimes
it was not, depending on which includes came before it. The result was a
random mix of sleep or sleep_for for boost versions >= 1.50.
2013-06-13 23:40:59 -04:00
Matt Corallo
b1f15b218b
Remove broken option to skip input checking for wallet txn.
2013-06-13 22:28:03 +02:00
Vaclav Vobornik
1d626952f9
Added GNU/kFreeBSD kernel name (TARGET_OS)
...
uname -s returns "GNU/kFreeBSD" on Debian GNU/kFreeBSD port. See http://www.debian.org/ports/kfreebsd-gnu/
2013-06-12 14:46:16 +02:00
bitsofproof
c87f462b74
send tx relay flag with version
2013-06-11 23:29:41 +02:00
Cozz Lovan
346427f01b
fix comment about dust logic
2013-06-11 05:06:02 +02:00
Jeff Garzik
d1020b780a
Merge pull request #2553 from Diapolo/threads
...
changes to thread code (directly use boost::thread)
2013-06-10 13:42:59 -07:00
Pieter Wuille
61983b3d16
Merge pull request #1863 from jgarzik/keytime
...
"Wallet birthdays": store key create time; calc whole-wallet birthday
2013-06-10 13:38:19 -07:00
Philip Kaufmann
53e71135de
changes to thread code (directly use boost::thread)
...
- removes our NewThread() function an replaces remaining calls with
boost::thread with our TraceThread template
- remove ExitThread() function
- fix THREAD_PRIORITY_ABOVE_NORMAL for non Windows OSes
2013-06-10 19:49:54 +02:00
Philip Kaufmann
0206e38dcd
allow txindex to be removed and add a reindex dialog
...
- adds a reindex dialog for Bitcoin-Qt to change -txindex without the need
to supply -reindex
- now also does a -reindex, when removing the -txindex switch
2013-06-10 19:27:57 +02:00
Jeff Garzik
543d70a676
Merge pull request #2747 from luke-jr/getblock_verbose0
...
Add verbose flag to getblock RPC so it is possible to get hex dumps of blocks
2013-06-10 08:16:39 -07:00
Jeff Garzik
8da9dd0725
Wallet: optimize rescan to skip blocks prior to birthday
2013-06-10 09:38:13 -04:00
Jeff Garzik
3869fb89b6
Wallet: store key creation time. Calculate whole-wallet birthday.
...
This also encapsulate wallet-read state information into CWalletScanState.
2013-06-10 09:36:29 -04:00
Jeff Garzik
f59530ce6e
Merge pull request #2154 from CodeShark/dependencycleanup
...
Clean up code dependencies
2013-06-10 06:17:38 -07:00
Wladimir J. van der Laan
8b313c9331
Merge pull request #2749 from laanwj/2013_06_addtotalbalance
...
qt: Add total balance in overview page
2013-06-09 01:06:36 -07:00
Wladimir J. van der Laan
3e9c8bab54
Create parent directories if needed in GetDataDir
...
One-line change. Fixes #2752 .
2013-06-08 10:03:23 +02:00
Luke Dashjr
2331952141
RPC: getblock(): Accept 2nd "verbose" parameter, similar to getrawtransaction, but defaulting to 1 for backward compatibility
2013-06-07 17:44:39 +00:00
Wladimir J. van der Laan
cb85aeb06c
qt: Add total balance in overview page
2013-06-07 15:33:32 +02:00
Eric Lombrozo
6e68524e95
Removed the main.h include from net.cpp.
2013-06-06 00:04:33 -07:00
Eric Lombrozo
501da2503a
Using boost::signals2 to message main from net.cpp.
2013-06-05 23:15:20 -07:00
Eric Lombrozo
aabdf9e899
Moved UpdateTime out of CBlockHeader and moved CBlockHeader into core.
2013-06-05 23:15:20 -07:00
Eric Lombrozo
48343a0a50
Removed script.cpp's dependence on main.h
2013-06-05 23:15:20 -07:00
Eric Lombrozo
65e7bbef74
Moved CCoins, CTxOutCompressor, CTxInUndo, and CTxUndo to core.
2013-06-05 23:15:20 -07:00
Eric Lombrozo
05df3fc68d
Removed AcceptToMemoryPool method from CTransaction. This method belongs to the mempool instance.
...
Removed AreInputsStandard from CTransaction, made it a regular function in main.
Moved CTransaction::GetOutputFor to CCoinsViewCache.
Moved GetLegacySigOpCount and GetP2SHSigOpCount out of CTransaction into regular functions in main.
Moved GetValueIn and HaveInputs from CTransaction into CCoinsViewCache.
Moved AllowFree, ClientCheckInputs, CheckInputs, UpdateCoins, and CheckTransaction out of CTransaction and into main.
Moved IsStandard and IsFinal out of CTransaction and put them in main as IsStandardTx and IsFinalTx. Moved GetValueOut out of CTransaction into main. Moved CTxIn, CTxOut, and CTransaction into core.
Added minimum fee parameter to CTxOut::IsDust() temporarily until CTransaction is moved to core.h so that CTxOut needn't know about CTransaction.
2013-06-05 23:15:20 -07:00
Eric Lombrozo
788536f175
Moved CInPoint to core. Removed GetMinFee from CTransaction and made it a regular function in main.
2013-06-05 23:15:19 -07:00
Eric Lombrozo
effc2770f5
Created core.h/core.cpp, added to makefiles. Started moving core structures from main to core beginning with COutPoint.
2013-06-05 23:14:52 -07:00
Eric Lombrozo
663224c232
Removed net.cpp's dependency on init.h.
...
Added explicit include of main.h in init.cpp, changed include of init.h to include of main.h in net.cpp.
Added function registration for net.cpp in init.cpp's network initialization.
Removed protocol.cpp's dependency on main.h.
TODO: Remove main.h include in net.cpp.
2013-06-05 20:36:10 -07:00
Eric Lombrozo
4751d07efd
Moved unrelated-to-network calls in StartNode and StopNode into init.cpp
2013-06-05 20:36:10 -07:00
Eric Lombrozo
8926263dde
Moved PushGetBlocks to main.cpp to eliminate dependence of net.cpp on CBlockLocator.
2013-06-05 20:36:10 -07:00
Eric Lombrozo
336fe971e6
Get rid of db dependencies on main
2013-06-05 20:36:10 -07:00
Jeff Garzik
c94bd68547
Merge pull request #2700 from theuni/gui-split
...
autotools: Gui split
2013-06-05 10:56:24 -07:00
Wladimir J. van der Laan
fc1f360fce
Merge pull request #2731 from Diapolo/rpcconsole
...
Bitcoin-Qt: harmonize 2 setClientModel() functions
2013-06-05 09:27:23 -07:00
Cory Fields
99add01e76
osx: fix bitcoin-qt startup crash when clicking dock icon
...
Crash probably introduced by 4d17a1b0
.
Inialize the window to NULL and verify it before use.
2013-06-04 23:55:35 -04:00
Cory Fields
34994ebcb0
build: cosmetics after last commit
2013-06-04 03:54:14 -04:00
Cory Fields
ee4b170c92
build: use runtime setting for wallet rather than QT_GUI define
2013-06-04 03:54:14 -04:00
Cory Fields
7f61f1ac78
build: use runtime setting for displaying the help message rather than QT_GUI define
2013-06-04 03:54:14 -04:00
Cory Fields
c98c88b3ab
build: cosmetic: split usage string for easier formatting
2013-06-04 03:54:14 -04:00
Cory Fields
13c84b3bd5
build: add global var for whether or not the gui is enabled
2013-06-04 03:54:14 -04:00
Cory Fields
c862d2ff22
build: split the non-gui startup routines into a new file
...
This will allow each to have its own main(), meaning that we can build a common
base client and simply link in the correct startup object to create the
appropriate binary.
2013-06-04 03:54:14 -04:00
Cory Fields
a9380c72be
build: prepare to move DetectShutdownThread
2013-06-04 03:53:40 -04:00
Wladimir J. van der Laan
c83d4d2170
Merge pull request #2613 from jonasschnelli/prefsFix
...
MaxOSX: settings fixes (#2371 )
2013-06-03 09:17:55 -07:00
Wladimir J. van der Laan
cd945c3bc9
Merge pull request #2727 from TheBlueMatt/master
...
One more data-driven test-case
2013-06-03 09:14:58 -07:00
Jonas Schnelli
39fe9de6b2
Merge branch 'master' of git://github.com/bitcoin/bitcoin into prefsFix
...
Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
Conflicts:
bitcoin-qt.pro
2013-06-03 15:18:41 +02:00
Philip Kaufmann
1fc57d568b
Bitcoin-Qt: harmonize 2 setClientModel() functions
...
- harmonize BitcoinGUI::setClientModel() and RPCConsole::setClientModel()
- now RPCConsole::setClientModel() also includes a direct call to
setNumBlocks()
2013-06-03 14:10:14 +02:00
Jonas Schnelli
f679b2900a
MaxOSX: settings fixes ( #2371 )
...
- Launch-At-Startup implementation for mac
- Remove "Window" tab in settings
Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-06-03 12:26:56 +02:00
Matt Corallo
14c12b094b
Add new data-driven test-case.
2013-06-02 20:51:01 +02:00
Philip Kaufmann
80fccb0eb3
Bitcoin-Qt: setup testnet GUI directly
...
- this directly sets up all GUI elements that have testnet special-casing
without first setting up main net stuff and changing afterwards (titles,
icons etc.)
- also fixes 2 wrong icons shown during testnet usage on our toolbar
2013-06-02 17:40:28 +02:00
vhf / victor felder
a35e268da4
Too many bitcoins allowed in amount. ( #2401 )
...
Using magic number doesn't seem right. Could we factor this out, together with https://github.com/bitcoin/bitcoin/blob/master/src/bitcoinrpc.cpp#L96 ?
And what about BitcoinUnits::parse() as well ?
2013-06-02 14:44:55 +02:00
Wladimir J. van der Laan
50b4086a4a
Merge pull request #2588 from Diapolo/GetBoolArg
...
remove GetBoolArg() fDefault parameter defaulting to false
2013-06-02 05:21:24 -07:00
Philip Kaufmann
3260b4c090
remove GetBoolArg() fDefault parameter defaulting to false
...
- explicitly set the default of all GetBoolArg() calls
- rework getarg_test.cpp and util_tests.cpp to cover this change
- some indentation fixes
- move macdockiconhandler.h include in bitcoin.cpp to the "our headers"
section
2013-06-01 12:53:57 +02:00
Wladimir J. van der Laan
25c0cce7fb
Qt5 compatibility
...
This commit squashes all the changes in the Qt5 branch
relative to master.
Backward compatibility with Qt4 is retained.
Original authors:
- Philip Kaufmann <phil.kaufmann@t-online.de>
- Jonas Schnelli <jonas.schnelli@include7.ch>
2013-06-01 11:05:08 +02:00
Jeff Garzik
3fbd87e0dc
Merge pull request #2552 from Diapolo/win-typedef
...
remove obsolete and unused typedef for Windows
2013-05-30 09:42:47 -07:00
Wladimir J. van der Laan
a2d2e5e466
Merge pull request #2615 from jonasschnelli/mac10_8_not_center
...
osx: make use of the 10.8+ user notification center to display growl lik...
2013-05-30 09:25:54 -07:00
Jeff Garzik
6bc6d57303
Merge pull request #2716 from laanwj/2013_05_30_getwork
...
Move pMiningKey init out of StartRPCThreads
2013-05-30 09:15:16 -07:00
Jeff Garzik
87ec1929cf
Merge pull request #2705 from robbak/crash_zero_size_peers.dat
...
Don't attempt to resize vector to negative size.
2013-05-30 09:13:44 -07:00
Jeff Garzik
d397715661
Merge pull request #2644 from sipa/constfindblock
...
Make FindBlockByHeight constant-time
2013-05-30 08:06:44 -07:00
Jeff Garzik
3fad76bf83
Merge pull request #2642 from sipa/rightgenesis
...
Check for correct genesis
2013-05-30 08:04:02 -07:00
Jeff Garzik
9c95a2e836
Merge pull request #2625 from gavinandresen/walletlock_asio
...
Use boost::asio::deadline_timer for walletpassphrase timeout
2013-05-30 08:01:22 -07:00
Jeff Garzik
e2f42142a0
Merge pull request #2600 from sipa/keyrefactor
...
Refactor key.cpp/.h
2013-05-30 07:55:25 -07:00
Jeff Garzik
1803fa1db9
Merge pull request #2693 from jgarzik/checkpoint-bool
...
Replace repeated GetBoolArg() calls with Checkpoint::fEnabled variable set once at init time
2013-05-30 07:44:42 -07:00
Jeff Garzik
9d01dd7658
Merge pull request #2104 from al42and/listreceivedbyaddress_txids
...
listreceivedbyaddress now provides tx ids (issue #1149 )
2013-05-30 07:42:01 -07:00
Wladimir J. van der Laan
d98bf10f23
Move pMiningKey init out of StartRPCThreads
...
This commit decouples the pMiningKey initialization and shutdown from the RPC
threads.
`getwork` and `getblocktemplate` rely on pMiningKey, and can also be ran
from the debug window in the UI even when the RPC server is not running.
Solves issue #2706 .
2013-05-30 16:41:35 +02:00
Jeff Garzik
af93273799
Merge pull request #2657 from gmaxwell/its_after_may15_forever
...
It's after 2013-05-15 forever now, so remove the code for the May 15 fork
2013-05-30 07:35:44 -07:00
Pieter Wuille
896185d7ed
Make signature cache store CPubKeys
2013-05-30 05:20:23 +02:00
Pieter Wuille
dfa23b94c2
CSecret/CKey -> CKey/CPubKey split/refactor
2013-05-30 05:20:21 +02:00
Pieter Wuille
5d891489ab
Make CPubKey statically allocated
2013-05-30 05:18:42 +02:00
Pieter Wuille
ec0004aca0
Merge pull request #2671 from bytemaster/master
...
Fix Memory Leak
2013-05-29 20:14:20 -07:00
Pieter Wuille
5a336768ca
Merge pull request #2713 from sipa/zerodotnine
...
Prepare for 0.9 merge window
2013-05-29 20:12:41 -07:00
Pieter Wuille
8c8132be73
Prepare for 0.9 merge window
2013-05-30 04:43:51 +02:00
Pieter Wuille
d315eb0a76
Merge pull request #2695 from robbak/init_cpp-explicit_cast
...
Explictly cast calculation to int, to allow std::min to work.
2013-05-29 19:41:51 -07:00
Robert Backhaus
98ab2b5a26
Don't attempt to resize vector to negative size.
2013-05-29 12:12:33 +10:00
Wladimir J. van der Laan
09e437ba4e
Merge pull request #2696 from robbak/util_h-Add_stdarg_include
...
Explicitly #include stdarg.h, for access to va_list
2013-05-25 08:48:25 -07:00
Gavin Andresen
ef9acc5124
Bump build number to 0.8.2.2 for v0.8.2rc3
2013-05-24 16:11:44 -04:00
Gavin Andresen
378c526ee1
Merge pull request #2683 from Diapolo/translations
...
translations update 2013-05-23
2013-05-24 13:07:36 -07:00
Gavin Andresen
dbc6dea1b2
Fix crash-at-shutdown if exiting before initializing wallet
2013-05-24 15:52:52 -04:00
Jeff Garzik
f0d8a52cc0
Replace repeated GetBoolArg() calls with Checkpoint::fEnabled variable
...
set once at init time.
2013-05-24 11:10:53 -04:00
Robert Backhaus
65ec9eab2b
Explicitly #include stdarg.h, for access to va_list
2013-05-24 23:45:08 +10:00
Robert Backhaus
03f498080a
Explictly cast calculation to int, to allow std::max to work.
2013-05-24 23:40:51 +10:00
Jonas Schnelli
b4b0170595
osx: make use of the 10.8+ user notification center to display growl like notifications
...
- if 10.8, use user notification center, if <10.8, use growl
Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-05-24 12:51:46 +02:00
Gavin Andresen
36e826cea1
Clean up mining CReserveKey to prevent crash at shutdown
...
Fixes issue#2687
2013-05-23 14:17:15 -04:00
Philip Kaufmann
6a2da2ba96
translations update 2013-05-23
...
- integrates current translations from Transifex
2013-05-23 08:39:31 +02:00
Gregory Maxwell
95c2ba1689
Merge pull request #2682 from sipa/morewalletbb
...
More bestblock records in wallets
2013-05-22 14:01:31 -07:00
Gavin Andresen
0c4434cf77
Merge pull request #2652 from gavinandresen/version_0.8.2_final
...
Set CLIENT_VERSION_IS_RELEASE, bump build to 0.8.2.1
2013-05-22 13:23:38 -07:00
Gavin Andresen
f1e76e8121
Merge pull request #2649 from Diapolo/translations
...
translations update 2013-05-19 (for 0.8.2 release)
2013-05-22 12:22:45 -07:00
Pieter Wuille
95c7db3dbf
More bestblock records in wallets
...
Write bestblock records in wallets:
* Every 20160 blocks synced, no matter what (before: none during IBD)
* Every 144 blocks after IBD (before: for every block, slow)
* When creating a new wallet
* At shutdown
This should result in far fewer spurious rescans.
2013-05-22 20:59:36 +02:00
Gavin Andresen
6b99cfae3c
Merge pull request #2677 from sipa/fastcreate
...
CreateNewBlock performance improvements
2013-05-22 10:24:17 -07:00
Matt Corallo
e175c16f5b
Add a few data-driven tests for SIGHASH_ANYONECANPAY
2013-05-21 18:16:43 +02:00
Pieter Wuille
2ec349bc42
CreateNewBlock performance improvements
2013-05-21 03:53:32 +02:00
Daniel Larimer
a9280652ce
Fix memory leak on exception in Key::SignCompact
2013-05-19 15:46:11 -04:00
Daniel Larimer
173601705c
fix memory leak in CKey::SetCompactSignature()
2013-05-19 15:08:33 -04:00
Philip Kaufmann
38a33c085e
translations update 2013-05-19 (for 0.8.2 release)
...
- integrates current translations from Transifex
- new translation: af_ZA
2013-05-19 14:04:33 +02:00
Gregory Maxwell
a824121eb8
It's after 2013-05-15 forever now, so remove the code for the May 15 fork.
2013-05-16 13:34:01 -07:00
Gavin Andresen
8ae290d266
Set CLIENT_VERSION_IS_RELEASE, bump build to 0.8.2.1
2013-05-13 10:53:53 -04:00
Pieter Wuille
0fe8010a10
Make FindBlockByHeight constant-time.
...
Remove the pnext pointer in CBlockIndex, and replace it with a
vBlockIndexByHeight vector (no effect on memory usage). pnext can
now be replaced by vBlockIndexByHeight[nHeight+1], but
FindBlockByHeight becomes constant-time.
This also means the entire mapBlockIndex structure and the block
index entries in it become purely blocktree-related data, and
independent from the currently active chain, potentially allowing
them to be protected by separate mutexes in the future.
2013-05-12 19:52:16 +02:00
Pieter Wuille
5d274c9927
Check for correct genesis
...
At startup, check that the expected genesis is loaded. This should prevent
cases where accidentally a datadir from the wrong network is loaded
(testnet vs mainnet, e.g.).
2013-05-12 13:21:03 +02:00
Gavin Andresen
5b5d399593
Update version numbers for 0.8.2rc1 release
2013-05-10 09:50:33 -04:00
Gavin Andresen
056ab5b43f
Merge pull request #2630 from Diapolo/translations
...
translations update 2013-05-08 (for 0.8.2 release)
2013-05-10 06:35:27 -07:00
Gavin Andresen
dc4cf7c183
Merge pull request #2635 from gavinandresen/boost_chrono_osx
...
Link with boost_chrono library on OSX
2013-05-09 18:19:29 -07:00
Gavin Andresen
4332be71a2
Link with boost_chrono library on OSX
...
Compiling on my OSX 10.6 build machine, I get:
Undefined symbols:
"boost::chrono::steady_clock::now()", referenced from:
boost::cv_status boost::condition_variable::wait_for<long long, boost::ratio<1ll, 1000000000ll> >(boost::unique_lock<boost::mutex>&, boost::chrono::duration<long long, boost::ratio<1ll, 1000000000ll> > const&)in bitcoinrpc.o
Linking against the boost_chrono fixes the issue.
Windows builds already link against boost_chrono; Linux doesn't, but compiles (on pull-tester / gitian, at least).
2013-05-09 17:08:38 -04:00
Philip Kaufmann
40c387e517
translations update 2013-05-08
...
- integrates current translations from Transifex
2013-05-08 08:43:41 +02:00
William Yager
5fdd1251a8
Specified base_uint component size
...
A base_uint used to be made of an array of unsigned ints. This works
fine on most platforms, but might not work on certain present or future
platforms. The code breaks if an unsigned int is 16 or 64 bits, so it's
important to be specific. Also changed "u" to "you".
2013-05-07 20:03:17 -05:00
Gavin Andresen
e5ddaf5ec8
Merge pull request #2410 from gmaxwell/salvageharder
...
Make explicitly requested salvage operations keep going when there is an error.
2013-05-07 08:58:35 -07:00
Gavin Andresen
92f2c1fe0f
Use boost::asio::deadline_timer for walletpassphrase timeout
...
New method in bitcoinrpc: RunLater, that uses a map of deadline
timers to run a function later.
Behavior of walletpassphrase is changed; before, calling
walletpassphrase again before the lock timeout passed
would result in: Error: Wallet is already unlocked.
You would have to call lockwallet before walletpassphrase.
Now: the last walletpassphrase with correct password
wins, and overrides any previous timeout.
Fixes issue# 1961 which was caused by spawning too many threads.
Test plan:
Start with encrypted wallet, password 'foo'
NOTE:
python -c 'import time; print("%d"%time.time())'
... will tell you current unix timestamp.
Try:
walletpassphrase foo 600
getinfo
EXPECT: unlocked_until is about 10 minutes in the future
walletpassphrase foo 1
sleep 2
sendtoaddress mun74Bvba3B1PF2YkrF4NsgcJwHXXh12LF 11
EXPECT: Error: Please enter the wallet passphrase with walletpassphrase first.
walletpassphrase foo 600
walletpassphrase foo 0
getinfo
EXPECT: wallet is locked (unlocked_until is 0)
walletpassphrase foo 10
walletpassphrase foo 600
getinfo
EXPECT: wallet is unlocked until 10 minutes in future
walletpassphrase foo 60
walletpassphrase bar 600
EXPECT: Error, incorrect passphrase
getinfo
EXPECT: wallet still scheduled to lock 60 seconds from first (successful) walletpassphrase
2013-05-07 11:47:33 -04:00
Philip Kaufmann
e7d41be870
translations update 2013-05-07
...
- updates bitcoin_en.ts and bitcoinstrings.cpp
- integrates current translations from Transifex
2013-05-07 09:14:23 +02:00
Gavin Andresen
33edd0a477
Merge pull request #2577 from gavinandresen/fee_bandaid
...
Treat dust outputs as non-standard, un-hardcode TX_FEE constants
2013-05-04 10:15:39 -07:00
Pieter Wuille
f309cb76c2
Merge pull request #2606 from gavinandresen/threadfix
...
Exit cleanly if AppInit2 returns false
2013-05-04 07:43:15 -07:00
Philip Kaufmann
b9763faf12
translations update 2013-05-04
...
- updates bitcoin_en.ts and bitcoinstrings.cpp
- removes bitcoin_se.ts
- adds bitcoin_ar.ts
- integrates current translations from Transifex
2013-05-04 12:30:14 +02:00
Pieter Wuille
674ae7a26f
Merge pull request #2558 from sipa/nodbdir
...
Some database/-related recovery improvements
2013-05-03 15:17:33 -07:00
Pieter Wuille
979a22a7a0
Merge pull request #2599 from sipa/norecvdisc
...
Do not kill connections on recv buffer overflow
2013-05-03 15:12:41 -07:00
Gavin Andresen
db1dc95f0a
Merge pull request #2614 from jonasschnelli/icon_testnet_mac
...
osx: show testnet icon in dock as early as possible
2013-05-03 14:39:22 -07:00
Gavin Andresen
4a4e9a3f8d
Merge pull request #2610 from gavinandresen/scriptcleanup
...
Remove implementation of disabled opcodes
2013-05-03 14:38:18 -07:00
Gavin Andresen
61a845dcb6
Merge pull request #2566 from sipa/nodef
...
Allow the default key to be unavailable
2013-05-03 14:33:02 -07:00
Gavin Andresen
aa62b2c433
Merge pull request #2607 from gavinandresen/loadwalletfix
...
Do not write to wallet during LoadWallet
2013-05-03 14:32:47 -07:00
Pieter Wuille
aa6b3061ee
Merge pull request #2603 from sipa/nobestblock
...
Bugfix: if no bestblock record is present, do a -rescan
2013-05-03 14:08:46 -07:00
Gavin Andresen
26585c36b2
Merge pull request #2602 from sipa/utxostate
...
Improve gettxoutsetinfo command
2013-05-03 11:00:31 -07:00
Pieter Wuille
bcb79a64c9
Merge pull request #2598 from Diapolo/init
...
small init.cpp changes (strings / Winsock init)
2013-05-03 10:44:14 -07:00
Philip Kaufmann
110257a631
small init.cpp changes (strings / Winsock init)
...
- add a check that requested Winsock version is available
- update some strings
- remove -gen=0 from help-message as this is default
2013-05-03 19:42:12 +02:00
Gavin Andresen
000dc55181
Un-hardcode TX_FEE constants
...
Allow setting of MIN_TX_FEE / MIN_RELAY_TX_FEE with
-mintxfee / -mintxrelayfee
Default values are the same (0.0001 BTC).
2013-05-03 10:54:31 -04:00
Gavin Andresen
1f00f4e9c9
CreateTransaction: return strFailReason on failure
2013-05-03 10:54:31 -04:00
Gavin Andresen
8de9bb53af
Define dust transaction outputs, and make them non-standard
2013-05-03 10:52:09 -04:00
Gavin Andresen
b8e1dc2e53
Remove flaky util thread unit tests
2013-05-03 10:45:00 -04:00
Jonas Schnelli
367491df9d
osx: show testnet icon in dock as early as possible
...
A green testnet splashscreen with a normal, orange dock icon looks strange and can confuse users.
Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-05-03 16:14:38 +02:00
Pieter Wuille
b45fd0a5a4
Merge pull request #2608 from jonasschnelli/pathCacheFix
...
clear path cache after getting a proper config file (fixes #2605 )
2013-05-03 04:52:03 -07:00
Gavin Andresen
bce697d7fa
Remove implementation of disabled opcodes
...
So we stop getting pull requests (like #2604 ) fixing problems with disabled Script opcodes.
A hard fork would be required to re-enable these, and if we ever did that we'd require extensive review and testing.
2013-05-02 17:33:57 -04:00
Jonas Schnelli
b357a71cfa
clear path cache after getting a proper config file ( fixes #2605 )
...
Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-05-02 18:55:25 +02:00
Gavin Andresen
2f15e86a68
Do not write to wallet during LoadWallet
...
When debugging another issue, I found a hang-during-startup race condition due to
LoadWallet calling SetMinVersion (via LoadCryptedKey).
Writing to the file that you're in the process of reading is a bad idea.
2013-05-02 12:43:07 -04:00
Gavin Andresen
d605bc4cd1
Exit cleanly if AppInit2 returns false
...
Bitcoin-Qt could core dump if application initialization failed in certain ways.
I double-fixed this:
1) qt/bitcoin.cpp now shuts down core threads cleanly if AppInit2 returns false
2) init.cpp now exits before StartNode() if strErrors is set (no reason to StartNode if we're just going to exit immediately anyway).
Tested by triggering all of the various ways AppInit2 can fail, either by passing bogus command-line arguments or just recompiling tweaked code to simulate failure.
This is a partial fix for #2480
2013-05-02 12:26:33 -04:00
Pieter Wuille
a9d9f0f5f7
Do not kill connections on recv buffer overflow
...
Instead of killing a connection when the receive buffer overflows,
just temporarily halt receiving before that happens. Also, no
matter what, always allow at least one full message in the receive
buffer (otherwise blocks larger than the configured buffer size
would pause indefinitely).
2013-05-01 20:56:50 +02:00
Pieter Wuille
2aceeb01a9
Bugfix: if no bestblock record is present, do a -rescan
...
It is possible to have a wallet.dat file without any bestblock
record at all (if created offline, for example), which - when
loaded into a client with a up-to-date chain - does no rescan and
shows no transactions.
Also make sure to write the current best block after a rescan, so
it isn't necessary twice.
2013-05-01 19:21:55 +02:00
Pieter Wuille
e31aa7c9d7
Improve gettxoutsetinfo command
...
* Bugfix: output the correct best block hash (during IBD, it can
differ from the actual current best block)
* Add height to output
* Add hash_serialized, which is a hash of the entire UTXO state.
Can be useful to compare two nodes.
* Add total_amount, the sum of all UTXOs' values.
2013-05-01 17:21:43 +02:00
Jeff Garzik
9f4976afe2
RPC: strictly require HTTP URI "/"
...
Previously, JSON-RPC clients accessed URI "/", and the JSON-RPC server
did not care about the URI at all, and would accept any URI as valid.
Change the JSON-RPC server to require URI "/" for all current accesses.
This changes enables the addition of future interfaces at different
URIs, such as pull request #1982 which demonstrates HTTP REST wallet
download.
Or, a future, breaking change in JSON-RPC interface could be introduced
by serving JSON-RPC calls from new URI "/v2/".
2013-05-01 10:41:24 -04:00
Pieter Wuille
788064dd12
Don't announce to non-peer CNodes
2013-04-30 19:41:58 +02:00
Pieter Wuille
1c621e70be
Merge pull request #2583 from laanwj/2013_04_netbase_bitfield
...
netbase: fix !O_NONBLOCK where ~O_NONBLOCK was meant
2013-04-29 16:36:51 -07:00
Pieter Wuille
d2cefe1674
Merge pull request #2589 from sipa/win32ldberr
...
Some win32-leveldb related fixes
2013-04-29 16:36:25 -07:00
Gavin Andresen
67f93dc513
Merge pull request #2568 from sipa/rlimit
...
Try to increase file descriptor rlimit if necessary
2013-04-29 13:25:13 -07:00
Pieter Wuille
228b29cf8f
Merge pull request #2349 from dserrano5/master
...
Accept negative -par values to leave N CPUs free.
2013-04-29 10:54:04 -07:00
David Serrano
ebd7e8bf91
Accept negative -par values to leave N CPUs free.
2013-04-29 19:35:47 +02:00
Wladimir J. van der Laan
7226806e8d
Merge pull request #2569 from sipa/win1024fd
...
Allow select()ing up to 1024 file descriptors on Windows
2013-04-29 10:27:33 -07:00
Pieter Wuille
ba29a5590b
Try to increase file descriptor rlimit if necessary
...
As the default can be too low, especially on OSX.
2013-04-29 01:46:24 +02:00
Pieter Wuille
551b367f19
Allow files to be opened for reading multiple times
2013-04-28 14:15:34 +02:00
Wladimir J. van der Laan
d23fa49c52
move WSAStartup to init
...
WSAStartup should be called before using any other socket
functions. BindListenPort is not called if not listening.
Closes #2585 .
2013-04-28 08:54:27 +02:00
Pieter Wuille
20d6f2013b
Checking whether closing succeeds
2013-04-27 20:07:22 +02:00
Pieter Wuille
67efbda4a2
Print actual Win32 error that occurred on file creation failure.
2013-04-27 18:28:41 +02:00
Tariq Bashir
6e34d9b12a
Prevent prevent file descriptor leak in ShrinkDebugFile()
2013-04-27 16:00:28 +02:00
Wladimir J. van der Laan
fe9e88cb06
fix !O_NONBLOCK where ~O_NONBLOCK was meant
...
Using ! on a non-zero value will always return 0.
Also remove some duplicate and superfluous code in other places.
2013-04-27 15:37:26 +02:00
Wladimir J. van der Laan
63888d43be
Merge pull request #2530 from jonasschnelli/mac_win_reopen_fix
...
fixes #1522 : GUI Disappearing (Mac OSX)
2013-04-27 02:15:54 -07:00
Wladimir J. van der Laan
aa9eee7eaf
Merge pull request #2564 from Diapolo/walletview
...
small updates for walletview.cpp
2013-04-27 02:08:08 -07:00
Wladimir J. van der Laan
dffb535ead
qt: remove fee recommendation in settings
...
This value gets stale really quickly, do not hardcode it into a message.
Completely remove it for now.
Later on, a mechanism will be added to determine fees based on the mempool.
Closes #2576
2013-04-27 11:06:43 +02:00
Wladimir J. van der Laan
1a31428ec0
qt: remove extraneous padding introduced in multiwallet support patch
...
solve issue #2529
2013-04-26 07:38:24 +02:00
Pieter Wuille
33912d1f23
Allow select()ing up to 1024 file descriptors on Windows
2013-04-26 01:31:10 +02:00
Pieter Wuille
360cfe142c
Allow the default key to be unavailable
...
This solves the issue where no default key can be added after -salvagewallet.
2013-04-25 19:36:10 +02:00
Philip Kaufmann
9e334cfae3
translations update 2013-04-25
...
- new language "se"
- update bitcoin.qrc and bitcoin_en.ts
- fetch current translations from Transifex
2013-04-25 16:53:51 +02:00
Philip Kaufmann
46fd626b21
small updates for walletview.cpp
...
- make "&Export" translatable
- fix some includes
- small formatting changes
2013-04-25 16:15:31 +02:00
Pieter Wuille
ccda03b570
Remove database/ after clean shutdown
2013-04-24 22:38:56 +02:00
Pieter Wuille
1859aafef0
Try moving database/ away in case of failure
2013-04-24 01:37:19 +02:00
Philip Kaufmann
e79110822e
remove duplicate bitdb.Open() code from init
...
- remove code from step 7, which we already have in step 5 of init
2013-04-24 00:49:50 +02:00