forked from lthn/blockchain
fixed mdbx issues with with new version
This commit is contained in:
parent
8d8ec50ae7
commit
f53b696798
1 changed files with 5 additions and 3 deletions
|
|
@ -143,9 +143,10 @@ namespace tools
|
|||
else
|
||||
{
|
||||
int res = 0;
|
||||
unsigned int flags = 0;
|
||||
MDBX_txn_flags_t flags = MDBX_txn_flags_t();
|
||||
unsigned int flags_ = 0;
|
||||
if (read_only)
|
||||
flags += MDBX_RDONLY;
|
||||
flags = MDBX_TXN_RDONLY;
|
||||
|
||||
//don't use parent tx in write transactions if parent tx was read-only (restriction in mdbx)
|
||||
//see "Nested transactions: Max 1 child, write txns only, no writemap"
|
||||
|
|
@ -340,7 +341,8 @@ namespace tools
|
|||
data[0].iov_base = (void*)v;
|
||||
data[0].iov_len = vs;
|
||||
|
||||
res = mdbx_put(get_current_tx(), static_cast<MDBX_dbi>(h), &key, data, 0);
|
||||
MDBX_put_flags_t flags = MDBX_put_flags_t();
|
||||
res = mdbx_put(get_current_tx(), static_cast<MDBX_dbi>(h), &key, data, flags);
|
||||
CHECK_AND_ASSERT_MESS_MDBX_DB(res, false, "Unable to mdbx_put");
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue