Miguel Freitas
6ade53ce53
implement new rpc dumppubkey.
...
importprivkey now verifies if username exists in txdb
2013-10-29 17:54:23 -02:00
Miguel Freitas
549ba353dd
yet another ThreadMaintainDHTNodes heuristic improvement
2013-10-29 10:48:06 -02:00
Miguel Freitas
3c90b0a94c
rt also updates status
2013-10-28 23:51:11 -02:00
Miguel Freitas
dbc640faaa
implement exact match on username search
2013-10-28 23:30:18 -02:00
Miguel Freitas
d16d50313a
insert directmsgs into vector ordered by time
2013-10-28 23:15:19 -02:00
Miguel Freitas
2cd0b0a881
rescandirectmsgs: rescan all streams of users we follow for new and old directmessages
2013-10-28 22:59:43 -02:00
Miguel Freitas
d9c64c2076
another try at ThreadMaintainDHTNodes to fix the problem of adding useless dht nodes and forcing announcements all the time.
2013-10-28 19:45:01 -02:00
Miguel Freitas
5dd9116627
less debug noise
2013-10-28 19:28:15 -02:00
Miguel Freitas
c7141bcb2e
prevent bencoding uninitialized entries (which causes assertion fail)
2013-10-28 19:17:50 -02:00
Miguel Freitas
d93da9efd5
2 months to expire posts from dht
2013-10-27 22:54:47 -02:00
Miguel Freitas
5c0cb31f26
disable -fstack-protector on android. is it causing false-positives or is really
...
a stack overflow going on? if so why linux compilation doesn't show the same?
not sure, but it seems to work fine, no crashs without this flag.
2013-10-27 20:12:46 -02:00
Miguel Freitas
06c93bcf38
update port in help text
2013-10-27 16:12:06 -02:00
Miguel Freitas
f119226b8f
crtend fixes SIGILL
2013-10-26 19:09:13 -02:00
Miguel Freitas
699d7a0802
Merge branch 'master' of /home/miguel/softs/twister
2013-10-26 17:59:26 -02:00
Miguel Freitas
a7f7b45976
remove test code
2013-10-26 16:16:07 -02:00
Miguel Freitas
1d78f7ec27
improve dht resource expiration policy (still not enabled)
2013-10-26 16:00:16 -02:00
Miguel Freitas
3e64454b7d
Save lastk field to post so torrent-less navigation through posts is possible. => DONE
2013-10-26 13:42:50 -02:00
Miguel Freitas
2c6318caae
less noisy in debug
2013-10-26 13:09:20 -02:00
Miguel Freitas
66fb23c4b8
try to fix automatically another block db inconsistency problem
2013-10-26 13:08:37 -02:00
Miguel Freitas
d14dca10e1
disable libtorrent read cache cause i've messed up something
2013-10-25 23:44:08 -02:00
Miguel Freitas
39e8ed8fb7
increase number of rpc workers
2013-10-24 23:32:20 -02:00
Miguel Freitas
543898da85
Merge branch 'master' of ssh://pitanga//home/miguel/softs/twister
2013-10-22 21:12:15 -02:00
Miguel Freitas
55b3f62872
fix previous commit: don't clear spammsg if it is not consumed.
2013-10-22 19:55:23 -02:00
Miguel Freitas
552b7b542d
persist some global config. now we implement a spam policy max 1 every 8 hours (not cumulative).
2013-10-22 19:51:18 -02:00
Miguel Freitas
21faab36b7
inform the user that database will be rebuilt. without UI, the old message was confusing.
2013-10-22 19:47:50 -02:00
Miguel Freitas
6cb5364605
disable printf of dm's
2013-10-22 18:31:54 -02:00
Miguel Freitas
6fc4979a1f
no setlocale in android
2013-10-20 18:23:57 -02:00
Miguel Freitas
f69227c73a
android path "/sdcard/twister" (not quite standard but works)
2013-10-20 16:03:19 -02:00
Miguel Freitas
d9c98f3a73
add some mime types to the lame web server
2013-10-20 14:41:55 -02:00
Miguel Freitas
5f3731bab3
fixing android build
2013-10-19 16:09:57 -03:00
Miguel Freitas
15d7fd07b0
android compiling
2013-10-19 10:31:43 -03:00
Miguel Freitas
7e1726ba8c
implement expiring dht items (but it is not enabled yet)
2013-10-18 12:08:54 -03:00
Miguel Freitas
9783b971fb
almost compiling on android. linker error.
2013-10-16 08:09:35 -03:00
Miguel Freitas
b7aac66551
android fixes
2013-10-15 23:21:08 -03:00
Miguel Freitas
bdb70b0d14
small compilation fix
2013-10-15 22:16:56 -03:00
Miguel Freitas
d17224516f
shorter rpc name: getlocaldirectmessages => getdirectmsgs
2013-10-14 18:55:56 -03:00
Miguel Freitas
f75fc11274
getlocaldirectmessages: get decrypted direct messages sent/received by user
2013-10-14 11:41:40 -03:00
Miguel Freitas
42e7254af1
remove encryptDecryptTest(). i know it works.
2013-10-13 18:30:29 -03:00
Miguel Freitas
19f5c3cc0e
-1 is not used anymore for max_id since it breaks "geting up to post 0"
2013-10-13 18:05:56 -03:00
Miguel Freitas
38424e0afb
fix importing privkey to wallet (username was not saved to disk)
2013-10-13 17:59:08 -03:00
Miguel Freitas
274ffeb1f6
increase percentage of getaddr (ADDRMAN_GETADDR_MAX_PCT) until we grow older and bigger
2013-10-13 16:57:35 -03:00
Miguel Freitas
db74a61476
more addrman debug in getinfo
2013-10-13 14:13:46 -03:00
Miguel Freitas
ff563ccee1
print addrman size
2013-10-12 18:07:34 -03:00
Miguel Freitas
019da72568
rework initialization order a little, try to start torrents after dht comes up
2013-10-12 17:31:49 -03:00
Miguel Freitas
eab70b0466
force dht_announce on every torrent after adding dht nodes
2013-10-12 16:45:06 -03:00
Miguel Freitas
f1c58b9d2a
trying (once more) to improve ThreadMaintainDHTNodes (dht nodes from registration network nodes)
2013-10-12 16:24:30 -03:00
Miguel Freitas
56194d1eaf
dns seed
2013-10-12 14:49:30 -03:00
Miguel Freitas
e5b21d6810
fix dm store duplicate checking. i did it completely wrong before.
2013-10-10 23:25:44 -03:00
Miguel Freitas
34024136ae
tweaks. increase m_desired_queue_size, maybe 2 is too low due to rounding
...
number of pieces to the nearest multiple of 8. not sure.
2013-10-10 23:19:30 -03:00
Miguel Freitas
b803734915
prevent duplicates when adding dm to the list of decrypted messages (in memory) - untested
2013-10-10 19:44:44 -03:00
Miguel Freitas
22bf956f8a
printf typo
2013-10-10 14:03:41 -03:00
Miguel Freitas
9d1b5915f9
better error checking and variables names in user_data save/load
2013-10-10 14:02:37 -03:00
Miguel Freitas
02f3de841b
do lazy_entry type checking in loadUserData
2013-10-08 22:45:46 -03:00
Miguel Freitas
4c33706c40
persist user_data (following and DMs)
2013-10-08 22:37:29 -03:00
Miguel Freitas
99be67bb55
make instructions
2013-10-08 18:39:07 -03:00
Miguel Freitas
d5f3af166f
wallet must be updated with metadata of key being replaced. otherwise we get two keys with the same username next reload.
2013-10-08 17:22:37 -03:00
Miguel Freitas
d780dc76b9
getrawtransaction using username instead of hash
2013-10-08 16:18:06 -03:00
Miguel Freitas
38def2e03c
minor fix to avoid confusion: seq is not k
2013-10-08 15:48:08 -03:00
Miguel Freitas
f4939a7874
create structure per local user to keep m_following and directmsgs
...
add proper mutexes to twister.cpp
2013-10-08 15:39:56 -03:00
Miguel Freitas
91ba50b836
try to decrypt DM in acceptSignedPost (it works!)
2013-10-07 22:59:23 -03:00
Miguel Freitas
41fab6fb5a
priorize following list in listusernamespartial
2013-10-07 22:41:35 -03:00
Miguel Freitas
47292c424e
Merge branch 'master' of ssh://pitanga//home/miguel/softs/twister
2013-10-07 21:33:23 -03:00
Miguel Freitas
7e57fb2fe4
mempool uses txhash again (instead of userhash). this is needed to fix key replacement.
...
using userhash in mempool was a bad idea, it creates incompatibilities with merkle tree code etc.
now we are back to standard bitcoin protocol regarding tx and inv commands, possibly filter as well.
2013-10-07 19:33:29 -03:00
Miguel Freitas
cb7f080b75
less noisy. disable some dht announce and already connected messages
2013-10-06 23:02:30 -03:00
Miguel Freitas
7182f1bad8
getlasthave
2013-10-06 22:29:17 -03:00
Miguel Freitas
878061317e
leveldb repair for torrents
2013-10-02 20:03:32 -03:00
Miguel Freitas
0071cb31db
support key replacement from json rpc. seems to work.
2013-10-02 19:04:38 -03:00
Miguel Freitas
6f48cf1dc1
rebuild database on error
2013-10-01 19:53:27 -03:00
Miguel Freitas
b6db2327e4
add support (untested) for key replacement
2013-10-01 19:37:29 -03:00
Miguel Freitas
d1ec27e01a
dont trust getBestHeight == 0
2013-10-01 17:54:39 -03:00
Miguel Freitas
0df5c54166
promoted posts implemented
2013-10-01 08:57:51 -03:00
Miguel Freitas
ea32a5a117
- begin refactoring twister_utils.h
...
- new rpc commands getdefaultuser/setdefaultuser (why is it not setting default on creation?)
- putdht now receives a generic json value parameter
2013-09-28 17:17:14 -03:00
Miguel Freitas
adeeb15213
implement very very simple html server to fix cross-domain problems executing json-rpc from browser
2013-09-28 07:47:07 -03:00
Miguel Freitas
8294e75672
listusernamespartial rpc
2013-09-21 17:53:55 -03:00
Miguel Freitas
dc3b1b2c47
keep track of rt and dm messages and filter dm from get_pieces (getposts rpc)
2013-09-21 16:18:56 -03:00
Miguel Freitas
ac55203421
follow/unfollow rpc
2013-09-20 23:05:38 -03:00
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