Commit graph

375 commits

Author SHA1 Message Date
Riccardo Spagni
f780f2e7ba
Merge pull request #635
8b3539b core: prevent the database from being used by multiple daemons (moneromooo-monero)
2016-01-31 15:22:14 +02:00
Riccardo Spagni
569316aea3
Merge pull request #634
7fc6fa3 wallet: forbid dust altogether in output selection where appropriate (moneromooo-monero)
5e1a739 blockchain: log number of outputs available for a new tx (moneromooo-monero)
2016-01-31 15:21:45 +02:00
Riccardo Spagni
39d73d2a27
Merge pull request #631
bcac101 daemon: fix a few issues reported by valgrind (moneromooo-monero)
a7e8174 tx_pool: fix serialization of new relayed data (moneromooo-monero)
601ad76 hardfork: fix mixup in indexing variable in get_voting_info (moneromooo-monero)
444e22f blockchain: remove unused timer (moneromooo-monero)
7edfdd8 blockchain: fix m_sync_counter uninitialized variable use (moneromooo-monero)
d97582c epee: use generate_random_bytes for new random uuids (moneromooo-monero)
17c7c9c epee: remove dodgy random code that nobody uses (moneromooo-monero)
2016-01-31 15:20:18 +02:00
moneromooo-monero
8b3539bc11
core: prevent the database from being used by multiple daemons
A boost lock is used to determine whether more than one process
wants to access the database. The boost file_lock doesn't seem
to like locking directories, so we use an arbitrary file in it.
This allows to still run two daemons if they have different
database directories (ie, LMDB/BDB, different data directories).
2016-01-31 12:58:08 +00:00
moneromooo-monero
5e1a7391e8
blockchain: log number of outputs available for a new tx 2016-01-31 10:59:58 +00:00
moneromooo-monero
a7e817482c
tx_pool: fix serialization of new relayed data 2016-01-30 22:14:09 +00:00
moneromooo-monero
601ad76a5e
hardfork: fix mixup in indexing variable in get_voting_info 2016-01-30 22:13:20 +00:00
moneromooo-monero
444e22f01a
blockchain: remove unused timer 2016-01-30 19:02:33 +00:00
moneromooo-monero
7edfdd8f24
blockchain: fix m_sync_counter uninitialized variable use
It counts the number of blocks added since last zeroing
2016-01-30 19:01:43 +00:00
moneromooo-monero
bf6d1474c0
new flush_txpool command, and associated RPC call
It can flush a particular tx, or the whole pool (the RPC command
can flush a list of transactions too)
2016-01-30 13:28:26 +00:00
moneromooo-monero
4b23714658
tx_pool: serialize missing kept_by_block flag 2016-01-29 19:44:25 +00:00
moneromooo-monero
94b98fb5fa
tx_pool: do not accept txes not in a block if they timed out before
This is intended to avoid cases where a timed out tx will be
re-relayed by another peer for which it has not timed out yet,
which would cause the tx to stay in the network's pool for a
long time (until all peers time it out before another one
tries to relay it again).
2016-01-29 17:21:25 +00:00
moneromooo-monero
eadbdf354a
tx_pool: fix use of invalidated iterator 2016-01-29 17:21:20 +00:00
moneromooo-monero
3b1d7e03fc
Fix V1/V2 use of hard fork related parameters
Some of it uses hardcoded height, which will need some thinking
for next (voted upon) fork.
2016-01-29 17:21:11 +00:00
Riccardo Spagni
b9c7ba180d
added checkpoints 2016-01-15 15:22:31 +02:00
moneromooo-monero
945ac788d4
hardfork: fix accepting v2 blocks too early 2016-01-15 11:54:35 +00:00
Riccardo Spagni
b98d88c17e
Merge pull request #587
1e07110 Nicer looking exit when blockchain.bin is found (moneromooo-monero)
2015-12-31 22:34:57 +02:00
moneromooo-monero
1e07110a7a
Nicer looking exit when blockchain.bin is found
Do not print the exception message, and write the important bit
in red, since people will only read the last line otherwise.
2015-12-31 17:09:00 +00:00
moneromooo-monero
40f97ce83d
core: do not use the persistent pool state for tests
Fixes intermittent test failures when the pool contains
unexpected transactions that were brought in from the
live pool.
2015-12-31 14:24:06 +00:00
Riccardo Spagni
de03926850
updated copyright year 2015-12-31 08:39:56 +02:00
Riccardo Spagni
810a11267c
fixed copyrights with bad year references 2015-12-31 08:37:27 +02:00
moneromooo-monero
576effe11a
blockchain: kill ioservice on scope end, rather than manually
This ensures this will be done without fail, as the error prone
matching of every return with a call to KILL_IOSERVICE leads to
hard to debug corruption when one is missing.
2015-12-30 16:08:30 +00:00
moneromooo-monero
ed5d017c0f
miner: minor fixes on stop
- only try to stop if actually started
- print number of threads before zeroing it

This fixes the suspiciously doubled "Mining has been stopped"
message on exit.
2015-12-30 16:06:32 +00:00
Riccardo Spagni
ddc6d45f96
Merge pull request #573
0953355 blockchain_db: inform user about new format if blockchain.bin is found (moneromooo-monero)
2015-12-30 09:39:27 +02:00
Riccardo Spagni
fd36eea6dd
Merge pull request #572
b39aae7 Tweak 45800a25e9 (hyc)
4a5a5ff blockchain: always stop the ioservice before returning (moneromooo-monero)
78b65cf db_lmdb: safety close db at exit (moneromooo-monero)
45800a2 db_lmdb: fix a strdup/delete[] mistmatch (moneromooo-monero)
2015-12-30 09:38:41 +02:00
Riccardo Spagni
aa6dd048d8
Merge pull request #570
fc34132 Remove assert from status command (hyc)
2015-12-30 09:37:25 +02:00
Riccardo Spagni
a7e56870fe
Merge pull request #568
b0541a5 blockchain: remove obsolete containers (moneromooo-monero)
18a5211 blockchain: Fix height in call to on_blockchain_dec (moneromooo-monero)
2015-12-30 09:36:18 +02:00
moneromooo-monero
09533557b5
blockchain_db: inform user about new format if blockchain.bin is found 2015-12-28 23:03:46 +00:00
moneromooo-monero
4a5a5ff157
blockchain: always stop the ioservice before returning
Fixes a use after free
2015-12-28 22:47:46 +00:00
hyc
fc341325a7 Remove assert from status command
Crashes every time...
2015-12-27 08:44:18 +00:00
moneromooo-monero
b0541a56eb
blockchain: remove obsolete containers 2015-12-26 18:01:24 +00:00
moneromooo-monero
18a5211173
blockchain: Fix height in call to on_blockchain_dec
It was a noop anyway
2015-12-26 18:00:45 +00:00
moneromooo-monero
50ee591152
hardfork: ensure current_fork_index can not become negative on rescan 2015-12-26 13:17:00 +00:00
moneromooo-monero
f33a88cfc1
blockchain: fix a few block addition bugs
If the block reward was too high, the verification failed flag
was set, but the function continued. The code which was supposed
to trap this flag and return failure failed to trap it, and,
while the block was not added to the chain, the function would
return success.
The reason for avoiding returning when the block reward problem
was detected was to be able to return any transactions to the
pool if needed. This is now mooted by moving the transaction
return code to a separate function, which is now called at all
appropriate points, making the logic much simpler, and hopefully
correct now.
We also move the hard fork version check after the prev_id check,
as block which does not go on the top of the chain might not
have the expected version there, without being invalid just for
this reason.
Last, we trap the case where a block fails to be added due to
using already spent key images, to set the verification failed
flag.
2015-12-25 22:13:38 +00:00
moneromooo-monero
a9ff11c816
blockchain: fix an off by one error in unlocked time check 2015-12-25 22:12:52 +00:00
moneromooo-monero
f294be35bc
blockchain: reinstate double spending checks in check_tx_inputs
This fixes some double spending tests.
This may or may not be unneeded in normal (non test) circumstances,
to be determined later. Keeping these for now may be slower, but safer.
2015-12-25 22:11:21 +00:00
moneromooo-monero
737b6d6cf5
blockchain: make some flag twiddling code closer to the original
Probably paranoid and unnecessary
2015-12-25 22:10:27 +00:00
moneromooo-monero
81cb0fcdcc
blockchain: fix bitflipping test with quantized block rewards
Block reward may now be less than the full amount allowed.
This was breaking the bitflipping test.
We now keep track of whether a block which was accepted by the core
has a lower than allowed block reward, and allow this in the test.
2015-12-25 22:07:58 +00:00
moneromooo-monero
22ddf09bea
blockchain: add missing m_tx_pool.on_blockchain_dec
It was missing in the port to DB.
This is actually a noop, so should not have functional changes.
2015-12-25 22:04:13 +00:00
moneromooo-monero
d837c0ca90
blockchain: fix switch to alternative blockchain for more than one block
When rolling over more than one block, the db height will decrease,
but the split height should be constant, as per the original code.
2015-12-25 22:02:07 +00:00
moneromooo-monero
5cec076e13
blockchain: add a missing validity check to rollback_blockchain_switching
It was present in the original code
2015-12-25 22:01:21 +00:00
moneromooo-monero
3cabdb5ef2
core: catch exceptions from get_output_key
This can happen when trying to find an amount that does not exist,
and fixes a core test.
2015-12-25 21:59:26 +00:00
moneromooo-monero
5eef64578b
db: throw when given a non txout_to_key output to add
The check was explicit in the original version, so it seems
safer to make it explicit here, especially as it is now done
implicitely in a different place, away from the original check.
2015-12-25 21:56:37 +00:00
moneromooo-monero
8ea7af1ba3
Allow the wallet to access hard fork information
And make it change behavior slightly when close/after first hard fork
2015-12-19 14:52:30 +00:00
moneromooo-monero
3f2970fadb
Add missing semicolons after log statements 2015-12-19 14:47:37 +00:00
moneromooo-monero
01e92ebdb0
replace std::auto_ptr with std::unique_ptr
The former is obsolete
2015-12-17 22:47:13 +00:00
warptangent
9079a32c07
Fix typo 2015-12-15 06:33:22 -08:00
warptangent
3796941d8e
blockchain.cpp: Change indentation from 4 to 2 spaces 2015-12-15 06:33:15 -08:00
warptangent
725acc7f17
Replace tabs with two spaces for consistency with rest of codebase
Remove trailing whitespace in same files.
2015-12-15 06:22:06 -08:00
Riccardo Spagni
4550717464
Merge pull request #537
a74cc1b hardfork: only accept major versions we know about (moneromooo-monero)
2015-12-15 15:24:56 +02:00