Skip to content

Commit 65d3a5a

Browse files
authored
Merge branch 'master' into lazytree
2 parents 0977bfd + 59b7cb6 commit 65d3a5a

File tree

17 files changed

+71
-24
lines changed

17 files changed

+71
-24
lines changed

scripts/packaging/build-cli.sh

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
RELEASE_DIRECTORY=../../../../nethermind-packages
2+
CLI_PATH=nethermind/src/Nethermind/Nethermind.Cli
3+
LINUX=linux-x64
4+
OSX=osx-x64
5+
WIN10=win10-x64
6+
PUBLISH_PATH=bin/release/netcoreapp2.2
7+
EXEC=Nethermind.Cli
8+
ZIP=$EXEC.zip
9+
OUT=out
10+
LIN_RELEASE=nethermind-lin-x64
11+
OSX_RELEASE=nethermind-osx-x64
12+
WIN_RELEASE=nethermind-win-x64
13+
14+
cd $CLI_PATH
15+
16+
echo =======================================================
17+
echo Publishing Nethermind Cli for different platforms...
18+
echo =======================================================
19+
echo Nethermind Cli path: $CLI_PATH
20+
21+
dotnet publish -c release -r $LINUX
22+
dotnet publish -c release -r $OSX
23+
dotnet publish -c release -r $WIN10
24+
25+
rm -rf $OUT && mkdir $OUT $OUT/$LINUX $OUT/$OSX $OUT/$WIN10
26+
27+
echo =======================================================
28+
echo Packing Nethermind Cli for different platforms...
29+
echo =======================================================
30+
31+
warp-packer --arch linux-x64 --input_dir $PUBLISH_PATH/$LINUX/publish --exec $EXEC --output $OUT/$LINUX/$EXEC
32+
warp-packer --arch macos-x64 --input_dir $PUBLISH_PATH/$OSX/publish --exec $EXEC --output $OUT/$OSX/$EXEC
33+
warp-packer --arch windows-x64 --input_dir $PUBLISH_PATH/$WIN10/publish --exec $EXEC.exe --output $OUT/$WIN10/$EXEC.exe
34+
35+
mkdir -p $RELEASE_DIRECTORY/$LIN_RELEASE
36+
mkdir -p $RELEASE_DIRECTORY/$OSX_RELEASE
37+
mkdir -p $RELEASE_DIRECTORY/$WIN_RELEASE
38+
39+
mv $OUT/$LINUX/$EXEC $RELEASE_DIRECTORY/$LIN_RELEASE
40+
mv $OUT/$OSX/$EXEC $RELEASE_DIRECTORY/$OSX_RELEASE
41+
mv $OUT/$WIN10/$EXEC.exe $RELEASE_DIRECTORY/$WIN_RELEASE
42+
43+
rm -rf $OUT
44+
45+
echo =======================================================
46+
echo Building Nethermind Cli completed
47+
echo =======================================================

src/Nethermind/Nethermind.Blockchain/BlockProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ private void StoreTxReceipts(Block block, TxReceipt[] txReceipts)
232232
{
233233
txReceipts[i].BlockHash = block.Hash;
234234
_receiptStorage.Add(txReceipts[i], true);
235-
_txPool.RemoveTransaction(txReceipts[i].TransactionHash);
235+
_txPool.RemoveTransaction(txReceipts[i].TxHash);
236236
}
237237
}
238238

src/Nethermind/Nethermind.Blockchain/Filters/FilterManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ private FilterLog CreateLog(LogFilter logFilter, TxReceipt txReceipt, LogEntry l
303303
private FilterLog CreateLog(UInt256 logIndex, TxReceipt txReceipt, LogEntry logEntry)
304304
{
305305
return new FilterLog(logIndex, txReceipt.BlockNumber, txReceipt.BlockHash,
306-
(UInt256)txReceipt.Index, txReceipt.TransactionHash, logEntry.LoggersAddress,
306+
(UInt256)txReceipt.Index, txReceipt.TxHash, logEntry.LoggersAddress,
307307
logEntry.Data, logEntry.Topics);
308308
}
309309
}

src/Nethermind/Nethermind.Blockchain/Receipts/InMemoryReceiptStorage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ public TxReceipt Find(Keccak hash)
3434
}
3535

3636
public void Add(TxReceipt txReceipt, bool isProcessed)
37-
=> _receipts.TryAdd(txReceipt.TransactionHash, txReceipt);
37+
=> _receipts.TryAdd(txReceipt.TxHash, txReceipt);
3838

3939
public void Insert(long blockNumber, TxReceipt txReceipt)
4040
{
4141
if (txReceipt != null)
4242
{
43-
_receipts.TryAdd(txReceipt.TransactionHash, txReceipt);
43+
_receipts.TryAdd(txReceipt.TxHash, txReceipt);
4444
}
4545

4646
LowestInsertedReceiptBlock = blockNumber;

src/Nethermind/Nethermind.Blockchain/Receipts/PersistentReceiptStorage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public void Add(TxReceipt txReceipt, bool isProcessed)
6565
behaviors = behaviors | RlpBehaviors.Storage;
6666
}
6767

68-
_database.Set(txReceipt.TransactionHash,
68+
_database.Set(txReceipt.TxHash,
6969
Rlp.Encode(txReceipt, behaviors).Bytes);
7070
}
7171

@@ -80,7 +80,7 @@ public void Insert(long blockNumber, TxReceipt txReceipt)
8080
{
8181
var spec = _specProvider.GetSpec(blockNumber);
8282
RlpBehaviors behaviors = spec.IsEip658Enabled ? RlpBehaviors.Eip658Receipts : RlpBehaviors.None;
83-
_database.Set(txReceipt.TransactionHash, Rlp.Encode(txReceipt, behaviors).Bytes);
83+
_database.Set(txReceipt.TxHash, Rlp.Encode(txReceipt, behaviors).Bytes);
8484
}
8585

8686
LowestInsertedReceiptBlock = blockNumber;

src/Nethermind/Nethermind.Blockchain/Synchronization/FastBlocks/FastBlocksFeed.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ private int InsertReceipts(FastBlocksBatch batch)
525525
break;
526526
}
527527

528-
receipt.TransactionHash = block
528+
receipt.TxHash = block
529529
.Transactions[receiptIndex]
530530
.Hash;
531531
}

src/Nethermind/Nethermind.Cli/Modules/EthCliModule.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@ public string GetUncleCountByBlockNumber(string blockParameter)
100100
}
101101

102102
[CliFunction("eth", "getTransactionByBlockNumberAndIndex")]
103-
public string GetTransactionByBlockNumberAndIndex(string blockParameter, string index)
103+
public object GetTransactionByBlockNumberAndIndex(string blockParameter, string index)
104104
{
105-
return NodeManager.Post<string>("eth_getTransactionByBlockNumberAndIndex", blockParameter, index).Result;
105+
return NodeManager.Post<object>("eth_getTransactionByBlockNumberAndIndex", blockParameter, index).Result;
106106
}
107107

108108
[CliFunction("eth", "getTransactionReceipt")]
109-
public string GetTransactionReceipt(string txHash)
109+
public object GetTransactionReceipt(string txHash)
110110
{
111-
return NodeManager.Post<string>("eth_getTransactionReceipt", txHash).Result;
111+
return NodeManager.Post<object>("eth_getTransactionReceipt", txHash).Result;
112112
}
113113

114114
[CliFunction("eth", "getBalance")]

src/Nethermind/Nethermind.Core.Test/Builders/BlockTreeBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private Block CreateBlock(int splitVariant, int splitFrom, int i, Block parent)
126126
foreach (Transaction transaction in current.Transactions)
127127
{
128128
TxReceipt receipt = new TxReceipt();
129-
receipt.TransactionHash = transaction.Hash;
129+
receipt.TxHash = transaction.Hash;
130130
_receiptStorage.Add(receipt, false);
131131
receipts.Add(receipt);
132132
}

src/Nethermind/Nethermind.Core.Test/Builders/ReceiptBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public ReceiptBuilder WithLogs(LogEntry[] logs)
5757

5858
public ReceiptBuilder WithTransactionHash(Keccak hash)
5959
{
60-
TestObject.TransactionHash = hash;
60+
TestObject.TxHash = hash;
6161
return this;
6262
}
6363

src/Nethermind/Nethermind.Core/TransactionReceipt.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class TxReceipt
3030

3131
public long BlockNumber { get; set; }
3232
public Keccak BlockHash { get; set; }
33-
public Keccak TransactionHash { get; set; }
33+
public Keccak TxHash { get; set; }
3434
public int Index { get; set; }
3535
public long GasUsed { get; set; }
3636
public long GasUsedTotal { get; set; }

0 commit comments

Comments
 (0)