Merge commit 'a6adbdc0b0f90f122e5b58ca9bb7421c7b3989a0' into LokiMergeUpstream

This commit is contained in:
Doyle 2019-04-10 10:06:00 +10:00
commit a4a25cef28
4 changed files with 28 additions and 5 deletions

View File

@ -70,6 +70,9 @@ build the library binary manually. This can be done with the following command `
Debian / Ubuntu one liner for all dependencies
``` sudo apt update && sudo apt install build-essential cmake pkg-config libboost-all-dev libssl-dev libzmq3-dev libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libldns-dev libexpat1-dev doxygen graphviz libpgm-dev```
FreeBSD one liner for required to build dependencies
```pkg install git gmake cmake pkgconf boost-libs cppzmq libsodium```
### Cloning the repository
Clone recursively to pull-in needed submodule(s):
@ -255,9 +258,9 @@ application.
cd ~/loki
* **Optional**: if you would like a specific [version/tag](https://github.com/loki-project/loki/tags), do a git checkout for that version. eg. 'v2.0.3'. If you dont care about the version and just want binaries from master, skip this step:
* **Optional**: if you would like a specific [version/tag](https://github.com/loki-project/loki/tags), do a git checkout for that version. eg. 'v3.0.4'. If you dont care about the version and just want binaries from master, skip this step:
git checkout v2.0.3
git checkout v3.0.4
* If you are on a 64-bit system, run:
@ -281,7 +284,9 @@ application.
### On FreeBSD:
The project can be built from scratch by following instructions for Linux above. If you are running loki in a jail you need to add the flag: `allow.sysvipc=1` to your jail configuration, otherwise lmdb will throw the error message: `Failed to open lmdb environment: Function not implemented`.
The project can be built from scratch by following instructions for Linux above(but use `gmake` instead of `make`). If you are running loki in a jail you need to add the flag: `allow.sysvipc=1` to your jail configuration, otherwise lmdb will throw the error message: `Failed to open lmdb environment: Function not implemented`.
We expect to add Loki into the ports tree in the near future, which will aid in managing installations using ports or packages.
### On OpenBSD:

View File

@ -9641,7 +9641,7 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno
* the split so the new page is emptier than the old page.
* This yields better packing during sequential inserts.
*/
if (nkeys < 20 || nsize > pmax/16 || newindx >= nkeys) {
if (nkeys < 32 || nsize > pmax/16 || newindx >= nkeys) {
/* Find split point */
psize = 0;
if (newindx <= split_indx || newindx >= nkeys) {

View File

@ -611,6 +611,24 @@ int main(int argc, char* argv[])
}
already_pruned = true;
}
if (n == 0)
{
const uint64_t blockchain_height = core_storage[0]->get_current_blockchain_height();
const crypto::hash hash = core_storage[0]->get_block_id_by_height(blockchain_height - 1);
cryptonote::block block;
if (core_storage[0]->get_block_by_hash(hash, block))
{
if (block.major_version < network_version_11_infinite_staking)
{
time_t now = time(NULL);
if (now < 1555286400) // 15 april 2019
{
MERROR("Pruning before v11 will confuse peers. Wait for v11 first");
return 1;
}
}
}
}
}
core_storage[0]->deinit();
delete core_storage[0];

View File

@ -2185,7 +2185,7 @@ skip:
MDEBUG("Attempting to conceal origin of tx via anonymity network connection(s)");
// no check for success, so tell core they're relayed unconditionally
const bool pad_transactions = m_core.pad_transactions();
const bool pad_transactions = m_core.pad_transactions() || hide_tx_broadcast;
size_t bytes = pad_transactions ? 9 /* header */ + 4 /* 1 + 'txs' */ + tools::get_varint_data(arg.txs.size()).size() : 0;
for(auto tx_blob_it = arg.txs.begin(); tx_blob_it!=arg.txs.end(); ++tx_blob_it)
{