Skip to content

Commit

Permalink
DBFTPlugin: adapt new Conflicts attribute storage scheme (#828)
Browse files Browse the repository at this point in the history
* DBFTPlugin: adapt new Conflicts attribute storage scheme

Upgrade neo-modules to use neo-project/neo#2913.

Signed-off-by: Anna Shaleva <[email protected]>

* Update neo

* Fix version

* Fix NativeHistory

---------

Signed-off-by: Anna Shaleva <[email protected]>
Co-authored-by: Jimmy <[email protected]>
Co-authored-by: Shargon <[email protected]>
  • Loading branch information
3 people authored Nov 8, 2023
1 parent 3f19028 commit 2d7fb27
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/DBFTPlugin/Consensus/ConsensusService.OnMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private void OnPrepareRequestReceived(ExtensiblePayload payload, PrepareRequest
{
if (mempoolVerified.TryGetValue(hash, out Transaction tx))
{
if (NativeContract.Ledger.ContainsConflictHash(context.Snapshot, hash, tx.Signers.Select(s => s.Account)))
if (NativeContract.Ledger.ContainsConflictHash(context.Snapshot, hash, tx.Signers.Select(s => s.Account), neoSystem.Settings.MaxTraceableBlocks))
{
Log($"Invalid request: transaction has on-chain conflict", LogLevel.Warning);
return;
Expand All @@ -140,7 +140,7 @@ private void OnPrepareRequestReceived(ExtensiblePayload payload, PrepareRequest
{
if (neoSystem.MemPool.TryGetValue(hash, out tx))
{
if (NativeContract.Ledger.ContainsConflictHash(context.Snapshot, hash, tx.Signers.Select(s => s.Account)))
if (NativeContract.Ledger.ContainsConflictHash(context.Snapshot, hash, tx.Signers.Select(s => s.Account), neoSystem.Settings.MaxTraceableBlocks))
{
Log($"Invalid request: transaction has on-chain conflict", LogLevel.Warning);
return;
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Neo" Version="3.6.0" />
<PackageReference Include="Neo" Version="3.6.0-CI01428" />
</ItemGroup>

</Project>
3 changes: 1 addition & 2 deletions src/RpcServer/Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ public static JObject NativeContractToJson(this NativeContract contract, Protoco
["id"] = contract.Id,
["hash"] = contract.Hash.ToString(),
["nef"] = contract.Nef.ToJson(),
["manifest"] = contract.Manifest.ToJson(),
["updatehistory"] = settings.NativeUpdateHistory[contract.Name].Select(p => (JToken)p).ToArray()
["manifest"] = contract.Manifest.ToJson()
};
}
}
Expand Down

0 comments on commit 2d7fb27

Please sign in to comment.