Skip to content

Commit

Permalink
Rollback useless changes
Browse files Browse the repository at this point in the history
  • Loading branch information
flcl42 committed Nov 3, 2022
1 parent 25f3c4a commit c5f823f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
5 changes: 4 additions & 1 deletion src/Nethermind/Nethermind.Runner/configs/mainnet.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"BaseDbPath": "nethermind_db/mainnet",
"LogFileName": "mainnet.logs.txt",
"MemoryHint": 2048000000
},
"Network": {
"ActivePeersMaxCount": 100
},
"Sync": {
"FastSync": true,
Expand Down Expand Up @@ -35,4 +38,4 @@
"Merge": {
"Enabled": true
}
}
}
16 changes: 8 additions & 8 deletions src/Nethermind/Nethermind.Serialization.Rlp/HeaderDecoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ public class HeaderDecoder : IRlpValueDecoder<BlockHeader>, IRlpStreamDecoder<Bl
public BlockHeader? Decode(RlpStream rlpStream, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
{

if (rlpStream.IsNextItemNull())
{
rlpStream.ReadByte();
return null;
}
if (rlpStream.IsNextItemNull())
{
rlpStream.ReadByte();
return null;
}

Span<byte> headerRlp = rlpStream.PeekNextItem();
int headerSequenceLength = rlpStream.ReadSequenceLength();
int headerCheck = rlpStream.Position + headerSequenceLength;
Span<byte> headerRlp = rlpStream.PeekNextItem();
int headerSequenceLength = rlpStream.ReadSequenceLength();
int headerCheck = rlpStream.Position + headerSequenceLength;

Keccak? parentHash = rlpStream.DecodeKeccak();
Keccak? unclesHash = rlpStream.DecodeKeccak();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// along with the Nethermind. If not, see <http://www.gnu.org/licenses/>.

using System;
using System.Diagnostics;
using Nethermind.Core;
using Nethermind.Core.Caching;
using Nethermind.Db;
Expand Down Expand Up @@ -66,7 +65,6 @@ void LocalDelete()

public void PersistLevel(long number, ChainLevelInfo level, BatchWrite? batch = null)
{
//Console.WriteLine($"Persist {number} in {new StackTrace()}");
void LocalPersistLevel()
{
_blockInfoCache.Set(number, level);
Expand Down
2 changes: 1 addition & 1 deletion src/Nethermind/Nethermind.TxPool.Test/TxPoolTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ public void should_retrieve_added_transaction_correctly()
var transaction = Build.A.Transaction.SignedAndResolved().TestObject;
EnsureSenderBalance(transaction);
_specProvider = Substitute.For<ISpecProvider>();
_specProvider.NetworkId.Returns(transaction.Signature.ChainId.Value);
_specProvider.ChainId.Returns(transaction.Signature.ChainId.Value);
_txPool = CreatePool();
_txPool.SubmitTx(transaction, TxHandlingOptions.PersistentBroadcast).Should().Be(AcceptTxResult.Accepted);
_txPool.TryGetPendingTransaction(transaction.Hash, out var retrievedTransaction).Should().BeTrue();
Expand Down

0 comments on commit c5f823f

Please sign in to comment.