Skip to content

Commit

Permalink
xcore-0.9.0e
Browse files Browse the repository at this point in the history
- TIV related fixes and improvements
  • Loading branch information
IxiAngel committed Jul 17, 2022
1 parent 86f6941 commit 6ee2223
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Block/Block.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2373,7 +2373,7 @@ public bool compact()
totalSignerDifficulty = getTotalSignerDifficulty();

frozenSignatures = null;
signatures = null;
signatures.Clear();

superBlockSegments = null;

Expand Down
2 changes: 1 addition & 1 deletion Block/BlockHeaderStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public static bool saveBlockHeader(Block block_header)
if (block_header.version >= BlockVer.v10)
{
// nullify signatures to save space
block_header.signatures = null;
block_header.signatures.Clear();
block_header.setFrozenSignatures(null);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Meta/CoreConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CoreConfig
/// <summary>
/// Current version of IxiCore.
/// </summary>
public static readonly string version = "xcore-0.9.0d";
public static readonly string version = "xcore-0.9.0e";

/// <summary>
/// Current version of the Ixian network protocol.
Expand Down
9 changes: 6 additions & 3 deletions Transaction/TransactionInclusion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ class TransactionInclusion
ulong startingBlockHeight = 0;
byte[] startingBlockChecksum = null;

public ulong blockHeadersToRequestInChunk = 250;

public TransactionInclusion()
{
}
Expand Down Expand Up @@ -103,7 +105,7 @@ public void onUpdate()
}
catch (Exception e)
{
Logging.error("Exception occured in BlockHeaderStorage.init: " + e);
Logging.error("Exception occurred in BlockHeaderStorage.init: " + e);
}

Block last_block_header = BlockHeaderStorage.getLastBlockHeader();
Expand Down Expand Up @@ -161,7 +163,7 @@ private bool updateBlockHeaders(bool force_update = false)
lastRequestedBlockTime = currentTime;

// request next blocks
requestBlockHeaders(lastBlockHeader.blockNum + 1, 500);
requestBlockHeaders(lastBlockHeader.blockNum + 1, blockHeadersToRequestInChunk);

return true;
}
Expand Down Expand Up @@ -508,8 +510,9 @@ public void receivedBlockHeaders3(byte[] data, RemoteEndpoint endpoint)
verifyUnprocessedTransactions();
}
}
catch (Exception)
catch (Exception e)
{
Logging.error("Exception occurred while processing block header: " + e);
// TODO blacklist sender
updateBlockHeaders(true);
}
Expand Down

0 comments on commit 6ee2223

Please sign in to comment.