Skip to content

Commit

Permalink
*Fix mempool issue on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
4egod committed Jul 2, 2018
1 parent 491c65e commit d2ac6c5
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
5 changes: 5 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Release Notes

### v1.18.7.3
- Fix mempool issue on Windows
- Added API for block explorer
- Fix payment proof generation.

### v1.18.6.22
- Change POW algo (CryptoNight Lite, Variation 1)
- Change Difficulty algo (LWMA-2)
Expand Down
5 changes: 3 additions & 2 deletions src/Core/BlockChainState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ AddTransactionResult BlockChainState::add_transaction(const Hash &tid, const Tra
if (input.type() == typeid(KeyInput)) {
const KeyInput &in = boost::get<KeyInput>(input);
if (read_keyimage(in.key_image)) {
m_log(logging::INFO) << "TX! hash=" << common::pod_to_hex(tid) << " count=" << m_memory_state_tx.size() << std::endl;
// std::cout << common::pod_to_hex(tid) << " " << common::pod_to_hex(in.key_image) <<
//std::endl;
return AddTransactionResult::OUTPUT_ALREADY_SPENT; // Already spent in main chain
Expand Down Expand Up @@ -756,7 +757,7 @@ AddTransactionResult BlockChainState::add_transaction(const Hash &tid, const Tra
//: m_memory_state_fee_tx.begin()->first;
// if( m_memory_state_total_size-min_size >= MAX_POOL_SIZE)
// std::cout << "Aha" << std::endl;
m_log(logging::INFO) << "TX+ hash=" << common::pod_to_hex(tid) << " size=" << my_size << " count=" << m_memory_state_tx.size();
m_log(logging::INFO) << "TX+ hash=" << common::pod_to_hex(tid) << " size=" << my_size << " count=" << m_memory_state_tx.size() << std::endl;
//<< " fee=" << my_fee << " f/b=" << my_fee_per_byte << " current_pool_size=("
//<< m_memory_state_total_size - min_size << "+" << min_size << ")=" << m_memory_state_total_size
//<< " count=" << m_memory_state_tx.size() << " min fee/byte=" << min_fee_per_byte << std::endl;
Expand Down Expand Up @@ -801,7 +802,7 @@ void BlockChainState::remove_from_pool(Hash tid) {
//auto min_fee_per_byte = m_memory_state_fee_tx.empty() || m_memory_state_fee_tx.begin()->second.empty()
//? 0
//: m_memory_state_fee_tx.begin()->first;
m_log(logging::INFO) << "TX- hash=" << common::pod_to_hex(tid) << " size=" << my_size << " count=" << m_memory_state_tx.size();
m_log(logging::INFO) << "TX- hash=" << common::pod_to_hex(tid) << " size=" << my_size << " count=" << m_memory_state_tx.size() << std::endl;
//<< " current_pool_size=(" << m_memory_state_total_size - min_size << "+" << min_size << ")="
//<< m_memory_state_total_size << " count=" << m_memory_state_tx.size()
//<< " min fee/byte=" << min_fee_per_byte << std::endl;
Expand Down
8 changes: 4 additions & 4 deletions src/bitsum.rc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
//

1 VERSIONINFO
FILEVERSION 1,18,6,22
PRODUCTVERSION 1,18,6,22
FILEVERSION 1,18,7,3
PRODUCTVERSION 1,18,7,3
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x40004L
Expand All @@ -19,12 +19,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Bitsum Foundation"
VALUE "FileDescription", "Bitsum"
VALUE "FileVersion", "1.18.6.22"
VALUE "FileVersion", "1.18.7.3"
VALUE "InternalName", "bitsum.rc"
VALUE "LegalCopyright", "Copyright (C) Bitsum Foundation, 2018"
VALUE "OriginalFilename", "bitsum.rc"
VALUE "ProductName", "Bitsum"
VALUE "ProductVersion", "1.18.6.22"
VALUE "ProductVersion", "1.18.7.3"
END
END
BLOCK "VarFileInfo"
Expand Down
6 changes: 6 additions & 0 deletions src/platform/DBsqlite3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ static std::pair<const unsigned char *, size_t> get(const sqlite::Stmt &stmt, co
auto da = reinterpret_cast<const unsigned char *>(sqlite3_column_blob(stmt.handle, 0));
si = sqlite3_column_bytes(stmt.handle, 1);
da = reinterpret_cast<const unsigned char *>(sqlite3_column_blob(stmt.handle, 1));

if (da == nullptr)
{
da = new unsigned char[0];
}

return std::make_pair(da, si);
}

Expand Down
4 changes: 2 additions & 2 deletions src/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#pragma once

// defines are for Windows resource compiler
#define bytecoin_VERSION_WINDOWS_COMMA 1, 18, 6, 22
#define bytecoin_VERSION_STRING "1.18.6.22"
#define bytecoin_VERSION_WINDOWS_COMMA 1, 18, 7, 3
#define bytecoin_VERSION_STRING "1.18.7.3"

#ifndef RC_INVOKED // Windows resource compiler

Expand Down

0 comments on commit d2ac6c5

Please sign in to comment.