Commit graph

949 commits

Author SHA1 Message Date
Riccardo Spagni 0eb3b6645c
Merge pull request #532
79ff6a5 Add LMDB error string to database transaction exception message (warptangent)
2015-12-13 22:16:05 +02:00
Riccardo Spagni bdf738bc7f
Merge pull request #531
cbded43 core_tests: fix ring_signature_1 tests (moneromooo-monero)
c3d208f core_tests: bump default test fee to 0.02 monero (moneromooo-monero)
10da0a0 add a --fakechain argument for tests (moneromooo-monero)
eee44e6 unit_tests: fix block reward test using post hard fork settings (moneromooo-monero)
595893f blockchain: log block (not chain) height in "BLOCK SUCCESFULLY ADDED" (moneromooo-monero)
2369968 blockchain: fix off by one in get_blocks (moneromooo-monero)
8af913a db_lmdb: implement BlockchainLMDB::reset (moneromooo-monero)
4833f4f db_bdb: implement BlockchainBDB::reset (moneromooo-monero)
18bf06e tx_pool: fix "minumim" typo in message (moneromooo-monero)
44f1267 tests: fix a typo in test name (moneromooo-monero)
1494557 db_lmdb: create all needed directories, not just the leaf one (moneromooo-monero)
015b68a db_bdb: create all needed directories, not just the leaf one (moneromooo-monero)
f141869 tests: remove data-dir argument registration (moneromooo-monero)
2015-12-13 22:14:56 +02:00
Riccardo Spagni 281c1c1639
Merge pull request #530
0198306 Stop displaying internal commands for --help (luigi1111)
189d516 simplewallet help & error cleanup (luigi1111)
2015-12-13 22:05:21 +02:00
warptangent 79ff6a5a56
Add LMDB error string to database transaction exception message
When throwing an exception from being unable to begin an LMDB
transaction, include the reason.

It's often been due to a write transaction attempted within a write
transaction (batch mode), but there can be other reasons such as write
transaction attempted while database was opened read only, or
environment's map needs to be resized.
2015-12-13 09:09:46 -08:00
moneromooo-monero 10da0a0b7c
add a --fakechain argument for tests
The core tests use the blockchain, and reset it to be able
to add test data to it. This does not play nice with the
databases, since those will save that data without an explicit
save call.
We add a fakechain flag that the tests will set, which tells
the core and blockchain code to use a separate database, as
well as skip a few things like checkpoints and fixup, which
only make sense for real data.
2015-12-13 11:38:37 +00:00
moneromooo-monero 595893fcba
blockchain: log block (not chain) height in "BLOCK SUCCESFULLY ADDED"
This makes it log the same height as the original code, which is
less confusing when comparing behaviors.
2015-12-13 11:16:37 +00:00
moneromooo-monero 2369968dc3
blockchain: fix off by one in get_blocks 2015-12-13 11:16:07 +00:00
moneromooo-monero 8af913a3d1
db_lmdb: implement BlockchainLMDB::reset
It is needed by the core tests
2015-12-13 11:14:06 +00:00
moneromooo-monero 4833f4f96f
db_bdb: implement BlockchainBDB::reset
It is needed by the core tests
2015-12-13 11:14:00 +00:00
moneromooo-monero 18bf06e4a5
tx_pool: fix "minumim" typo in message 2015-12-13 11:13:51 +00:00
moneromooo-monero 1494557633
db_lmdb: create all needed directories, not just the leaf one 2015-12-13 11:09:43 +00:00
moneromooo-monero 015b68a2be
db_bdb: create all needed directories, not just the leaf one 2015-12-13 11:08:59 +00:00
luigi1111 0198306473 Stop displaying internal commands for --help
Displaying in-program commands with --help doesn't match daemon
behaviour (or make sense)
2015-12-11 18:41:36 -06:00
luigi1111 189d516dae simplewallet help & error cleanup
Typos, grammar, consistency. I don't claim to have gotten everything.
2015-12-11 18:05:39 -06:00
Howard Chu d98d5e79cb Fix data refs in read-only txns
Data is only guaranteed to be valid within the lifetime of a txn.
You cannot use data returned from LMDB after the txn ends.
Also, fixed a missing txn.commit BlockchainLMDB::get_tx_unlock_time()
2015-12-10 01:45:40 +00:00
Riccardo Spagni e175205e6e
Merge pull request #527
336b375 Register daemon command line arguments to core if they're used in core (moneromooo-monero)
2015-12-09 10:30:20 +02:00
moneromooo-monero 336b37580f
Register daemon command line arguments to core if they're used in core
This fixes coretests, which does not register daemon specific arguments,
but uses core, which uses those arguments. Also gets rid of an unwanted
dependency on daemon code from core.
2015-12-08 23:06:29 +00:00
Riccardo Spagni b87f073a60
Merge pull request #526
2c83055 net_node: add a --offline argument (moneromooo-monero)
2015-12-08 20:12:18 +02:00
Riccardo Spagni 45191c3b30
Merge pull request #525
f746434 daemon: add mining status to the status command (moneromooo-monero)
2015-12-08 20:11:30 +02:00
Riccardo Spagni 8a5ba475cb
Merge pull request #524
1c8262c db_bdb: move log_set_config call before open (moneromooo-monero)
2015-12-08 20:11:06 +02:00
Riccardo Spagni 1fc1bfb677
Merge pull request #523
8620b31 db_bdb: support for libdb without DB_FORCESYNC (moneromooo-monero)
2015-12-08 20:10:34 +02:00
Riccardo Spagni e7872656bc
Merge pull request #522
34e3889 p2p: failure to load p2pstate.bin is not fatal anymore (moneromooo-monero)
2015-12-08 20:10:04 +02:00
Riccardo Spagni d5496f72e5
Merge pull request #520
a98e976 blockchain_db: fixup missing key images in early DB version (moneromooo-monero)
2015-12-08 20:08:56 +02:00
moneromooo-monero 2c83055597
net_node: add a --offline argument
It will not try to connect to the monero network, nor listen
2015-12-07 20:21:45 +00:00
moneromooo-monero f7464343ea
daemon: add mining status to the status command 2015-12-07 19:40:12 +00:00
moneromooo-monero 1c8262c527
db_bdb: move log_set_config call before open
This is a precaution for older Berkeley DB versions.

- smooth reports an issue running with 4.7:
  DB_ENV->log_set_config: DB_LOG_IN_MEMORY: method not permitted
  after handle's open method
- this works just fine with 5.3
- we do not use DB_LOG_IN_MEMORY, but we use DB_LOG_AUTO_REMOVE
- libdb docs say some flags must be set before open, and some
  may be set at any time, but never say some must be set after
  open
- moving the call to log_set_config before open works with 5.3

Therefore, it seems best to move the call before open.
2015-12-07 19:22:22 +00:00
moneromooo-monero 8620b31019
db_bdb: support for libdb without DB_FORCESYNC 2015-12-07 09:31:53 +00:00
moneromooo-monero 34e388949d
p2p: failure to load p2pstate.bin is not fatal anymore
Clear any partially loaded data, and start with a default config
2015-12-07 00:20:56 +00:00
moneromooo-monero a98e976f9e
blockchain_db: fixup missing key images in early DB version
Early DB versions did not store key images for inputs if the
transaction spending them had no outputs (ie, all fee). This
is not correct, as this would allow these outputs to be double
spent. This was fixed in 533acc30ed
a few months ago, but databases having synced blocks 2021612 and
685498 with a faulty version will be missing those key images
in the spent keys database. This code checks for this, and adds
those key images if they are missing.
2015-12-06 21:55:05 +00:00
moneromooo-monero c6cfe0f26d
wallet: make the wallet refresh type a wallet setting
instead of a command line setting. It makes sense that is is
a long lived setting.
2015-12-05 21:44:25 +00:00
moneromooo-monero fef2493617
wallet: default auto-refresh to true for old wallets 2015-12-05 21:10:12 +00:00
Riccardo Spagni 0252ffc37b
Merge pull request #518
1965fce wallet: add a stop_wallet RPC call (moneromooo-monero)
2015-12-05 21:58:56 +02:00
moneromooo-monero a3c5ca077c
blockchain_db: make the indexing base a BlockchainDB virtual function 2015-12-05 18:41:29 +00:00
moneromooo-monero 1965fce402
wallet: add a stop_wallet RPC call 2015-12-05 14:53:37 +00:00
moneromooo-monero a702118426
blockchain_dump: fix output key dump for BDB 1-based indices
Berkeley DB uses 1 based indices for RECNO databases, and the
implementation of BlockchainDB for Berkeley DB assumes 1 based
indices are passed to the API, whereas the LMDB one assumes
0 based indices. This is all internally consisteny, but since
the BDB code stores 1 based indices in the database, external
users have to be aware of this, as the indices will be off by
one depending on which DB is used.
2015-12-05 12:40:01 +00:00
moneromooo-monero 3bf35e14e3
db_bdb: read 32 bit heights from keys
Keys in Berkeley DB are 32 bits. We don't want to read random
bits in the high part.
2015-12-04 22:25:00 +00:00
Riccardo Spagni 2bed53cb6b
Merge pull request #515
0921f5b util: use putenv instead of setenv for mingw (moneromooo-monero)
2015-11-30 18:33:43 +02:00
moneromooo-monero 41029d6d74
wallet2: default auto-refresh to true for preexisting wallets 2015-11-30 11:08:15 +00:00
Riccardo Spagni 2ea8d7345f Revert "Merge pull request #506"
This reverts commit c6bf73131a, reversing
changes made to 8a52cf4055.
2015-11-30 11:07:22 +02:00
Riccardo Spagni f78f9c5480
Merge pull request #512
36a298c simplewallet: add tr markers in a few missing user visible strings (moneromooo-monero)
2015-11-30 07:31:44 +02:00
moneromooo-monero d68a63e404
wallet: cancellable refresh
^C while in manual refresh will cancel the refresh, since that's
often an annoying thing to have to wait for. Also, a manual refresh
command will interrupt any running background refresh and take
over, rather than wait for the background refresh to be done, and
look to be hanging.
2015-11-29 23:24:56 +00:00
Riccardo Spagni 8289975e22
Merge pull request #511
66849ac simplewallet: swap colors in show_transfers (moneromooo-monero)
2015-11-30 00:25:49 +02:00
moneromooo-monero 36a298c375
simplewallet: add tr markers in a few missing user visible strings 2015-11-29 22:24:15 +00:00
Riccardo Spagni 5275db0786
Merge pull request #509
3030e3e wallet2: remove confirmed transactions from detached blocks (moneromooo-monero)
2015-11-30 00:23:58 +02:00
Riccardo Spagni bc1bc4adb2
Merge pull request #507
62e49a5 wallet: optional automatic refresh from the daemon (moneromooo-monero)
2015-11-30 00:19:47 +02:00
Riccardo Spagni c6bf73131a
Merge pull request #506
e45a8c9 core: serialize block major/minor versions as bytes, not varints (moneromooo-monero)
2015-11-30 00:18:48 +02:00
Riccardo Spagni 8a52cf4055
Merge pull request #505
7574297 core_rpc_server: add a --restricted-rpc option (moneromooo-monero)
2015-11-30 00:18:20 +02:00
Riccardo Spagni 5c3b29792c
Merge pull request #504
9ee48e9 wallet2: speed up wallet refresh for large miners (moneromooo-monero)
4905903 wallet2: parallelize pulling blocks and processing them on refresh (moneromooo-monero)
d0eaf1d wallet2: maintain the short chain manually when refreshing (moneromooo-monero)
a4e9506 wallet2: split pull blocks between pulling and processing (moneromooo-monero)
2015-11-30 00:17:34 +02:00
Riccardo Spagni 83b412f471
Merge pull request #503
55e5a33 rpc: pass current block target in rpc (moneromooo-monero)
2015-11-30 00:16:58 +02:00
moneromooo-monero 66849ac236
simplewallet: swap colors in show_transfers
Green is now used for incoming transfers, and magenta for outgoing
transfers. This is consistent to the scheme used by other logging.
2015-11-29 13:20:54 +00:00