Commit graph

26 commits

Author SHA1 Message Date
moneromooo-monero b52abd1370
Move txpool to the database
Integration could go further (ie, return_tx_to_pool calls should
not be needed anymore, possibly other things).

poolstate.bin is now obsolete.
2017-05-25 22:23:37 +01:00
Riccardo Spagni c3599fa7b9
update copyright year, fix occasional lack of newline at line end 2017-02-21 19:38:18 +02:00
kenshi84 8027ce0c75 extract some basic code from libcryptonote_core into libcryptonote_basic 2017-02-08 22:45:15 +09:00
moneromooo-monero 5833d66f65
Change logging to easylogging++
This replaces the epee and data_loggers logging systems with
a single one, and also adds filename:line and explicit severity
levels. Categories may be defined, and logging severity set
by category (or set of categories). epee style 0-4 log level
maps to a sensible severity configuration. Log files now also
rotate when reaching 100 MB.

To select which logs to output, use the MONERO_LOGS environment
variable, with a comma separated list of categories (globs are
supported), with their requested severity level after a colon.
If a log matches more than one such setting, the last one in
the configuration string applies. A few examples:

This one is (mostly) silent, only outputting fatal errors:

MONERO_LOGS=*:FATAL

This one is very verbose:

MONERO_LOGS=*:TRACE

This one is totally silent (logwise):

MONERO_LOGS=""

This one outputs all errors and warnings, except for the
"verify" category, which prints just fatal errors (the verify
category is used for logs about incoming transactions and
blocks, and it is expected that some/many will fail to verify,
hence we don't want the spam):

MONERO_LOGS=*:WARNING,verify:FATAL

Log levels are, in decreasing order of priority:
FATAL, ERROR, WARNING, INFO, DEBUG, TRACE

Subcategories may be added using prefixes and globs. This
example will output net.p2p logs at the TRACE level, but all
other net* logs only at INFO:

MONERO_LOGS=*:ERROR,net*:INFO,net.p2p:TRACE

Logs which are intended for the user (which Monero was using
a lot through epee, but really isn't a nice way to go things)
should use the "global" category. There are a few helper macros
for using this category, eg: MGINFO("this shows up by default")
or MGINFO_RED("this is red"), to try to keep a similar look
and feel for now.

Existing epee log macros still exist, and map to the new log
levels, but since they're used as a "user facing" UI element
as much as a logging system, they often don't map well to log
severities (ie, a log level 0 log may be an error, or may be
something we want the user to see, such as an important info).
In those cases, I tried to use the new macros. In other cases,
I left the existing macros in. When modifying logs, it is
probably best to switch to the new macros with explicit levels.

The --log-level options and set_log commands now also accept
category settings, in addition to the epee style log levels.
2017-01-16 00:25:46 +00:00
moneromooo-monero 81c384e408
fix do_not_relay not preventing relaying on a timer
Also print its value when printing pool
2017-01-14 13:07:05 +00:00
moneromooo-monero f782d45827
tests: hard fork list must end with a 0 2016-08-28 21:30:29 +01:00
moneromooo-monero 106e3dc3d4
Add rct core tests 2016-08-28 21:28:53 +01:00
moneromooo-monero 9ef8c7b694
tests: fix tests broken by the removal of the block reward accumulation loop
The tests for rejection of unmixable outputs in v2 are commented out,
as there are no unmixable outputs created anymore. This should be
restored at some point.
2016-05-01 20:59:41 +01:00
Javier Smooth 17cac41968
tests: fix build with older GCC 2016-04-02 22:05:56 +01:00
moneromooo-monero 4b425a397c
core_tests: fix compile failure with GCC 4.8.4
Reported and tested by smooth
2016-03-21 20:58:07 +00:00
moneromooo-monero f7301c3563
Revert "Print stack trace upon exceptions"
Ain't nobody got time for link/cmake skullduggery.

This reverts commit fff238ec94.
2016-03-21 10:12:23 +00:00
moneromooo-monero fff238ec94
Print stack trace upon exceptions
Useful for debugging users' logs
2016-03-19 21:48:36 +00:00
moneromooo-monero d56b2e5baf
core_tests: fix a compile problem with CLANG
It doesn't like const objects from classes that do not have
a user defined ctor, apparently.

Reported by othe.
2016-02-13 19:49:36 +00:00
moneromooo-monero a333c42cde
core_tests: add tests for hard fork behaviors (MRL-0004)
We also replace the --fakechain option with an optional structure
containing details about configuration for the core/blockchain,
for test purposes. This seems more future friendly.
2016-02-08 18:52:00 +00:00
moneromooo-monero 945fe90e08
core_tests: allow setting miner tx max_outs when creating a block 2016-02-08 18:50:08 +00:00
Riccardo Spagni de03926850
updated copyright year 2015-12-31 08:39:56 +02:00
moneromooo-monero b245215193
core_tests: deinit core before destroying it
This fixes a use after free by ioservice threads
2015-12-30 16:05:52 +00:00
moneromooo-monero c3d208fcbe
core_tests: bump default test fee to 0.02 monero
The current monero consensus uses 0.01 per kB fees, so use enough
for 2 kB transactions for now. It'll probably have to be either
bumped further or changed to calculate the proper fee.
2015-12-13 13:56:15 +00: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 f141869cac
tests: remove data-dir argument registration
It is already registered in cryptonote::core::init_options,
which we now call
2015-12-09 17:31:15 +00:00
moneromooo-monero 932994c0cb
Relay transactions when they linger too long in the pool
The last relayed time of a transaction is maintained, and
transactions will be relayed again if they are still in the
pool after a certain amount of time, which increases with
the transaction's age. All such transactions are resent,
whether or not they originated on the local node.
2015-11-21 00:56:21 +00:00
Thomas Winget 76289d0e3b
Fix tests building -- function signatures changed 2015-03-01 02:21:19 -05:00
Riccardo Spagni f4b69d553a
year updated in license 2015-01-02 18:52:46 +02:00
Zachary Michaels 07470fd400
Add testnet flag
Source: cryptonotefoundation
2014-09-15 15:53:01 +02:00
fluffypony 6fc995fe5d License updated to BSD 3-clause 2014-07-23 15:03:52 +02:00
Antonio Juarez 296ae46ed8 moved all stuff to github 2014-03-03 22:07:58 +00:00