-
Notifications
You must be signed in to change notification settings - Fork 0
/
neo.diff
80 lines (80 loc) · 4.14 KB
/
neo.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
diff --git a/src/Neo/Ledger/Blockchain.cs b/src/Neo/Ledger/Blockchain.cs
index 52b3c37c..e95e026c 100644
--- a/src/Neo/Ledger/Blockchain.cs
+++ b/src/Neo/Ledger/Blockchain.cs
@@ -234,7 +234,7 @@ namespace Neo.Ledger
};
if (result == VerifyResult.Succeed && relay)
{
- system.LocalNode.Tell(new LocalNode.RelayDirectly { Inventory = inventory });
+ system.LocalNode.Tell(new LocalNode.SendDirectly { Inventory = inventory });
}
SendRelayResult(inventory, result);
}
diff --git a/src/Neo/Network/P2P/RemoteNode.ProtocolHandler.cs b/src/Neo/Network/P2P/RemoteNode.ProtocolHandler.cs
index dfd21c63..687e91a3 100644
--- a/src/Neo/Network/P2P/RemoteNode.ProtocolHandler.cs
+++ b/src/Neo/Network/P2P/RemoteNode.ProtocolHandler.cs
@@ -82,28 +82,28 @@ namespace Neo.Network.P2P
OnInventoryReceived((IInventory)msg.Payload);
break;
case MessageCommand.FilterAdd:
- OnFilterAddMessageReceived((FilterAddPayload)msg.Payload);
+ // OnFilterAddMessageReceived((FilterAddPayload)msg.Payload);
break;
case MessageCommand.FilterClear:
- OnFilterClearMessageReceived();
+ // OnFilterClearMessageReceived();
break;
case MessageCommand.FilterLoad:
- OnFilterLoadMessageReceived((FilterLoadPayload)msg.Payload);
+ // OnFilterLoadMessageReceived((FilterLoadPayload)msg.Payload);
break;
case MessageCommand.GetAddr:
- OnGetAddrMessageReceived();
+ // OnGetAddrMessageReceived();
break;
case MessageCommand.GetBlocks:
- OnGetBlocksMessageReceived((GetBlocksPayload)msg.Payload);
+ // OnGetBlocksMessageReceived((GetBlocksPayload)msg.Payload);
break;
case MessageCommand.GetBlockByIndex:
- OnGetBlockByIndexMessageReceived((GetBlockByIndexPayload)msg.Payload);
+ // OnGetBlockByIndexMessageReceived((GetBlockByIndexPayload)msg.Payload);
break;
case MessageCommand.GetData:
- OnGetDataMessageReceived((InvPayload)msg.Payload);
+ // OnGetDataMessageReceived((InvPayload)msg.Payload);
break;
case MessageCommand.GetHeaders:
- OnGetHeadersMessageReceived((GetBlockByIndexPayload)msg.Payload);
+ // OnGetHeadersMessageReceived((GetBlockByIndexPayload)msg.Payload);
break;
case MessageCommand.Headers:
OnHeadersMessageReceived((HeadersPayload)msg.Payload);
@@ -112,10 +112,10 @@ namespace Neo.Network.P2P
OnInvMessageReceived((InvPayload)msg.Payload);
break;
case MessageCommand.Mempool:
- OnMemPoolMessageReceived();
+ // OnMemPoolMessageReceived();
break;
case MessageCommand.Ping:
- OnPingMessageReceived((PingPayload)msg.Payload);
+ if (((PingPayload)msg.Payload).LastBlockIndex < LedgerContract.Ledger.CurrentIndex(system.StoreView) - 1) Disconnect(true); else OnPingMessageReceived((PingPayload)msg.Payload);
break;
case MessageCommand.Pong:
OnPongMessageReceived((PingPayload)msg.Payload);
diff --git a/src/Neo/Network/P2P/RemoteNode.cs b/src/Neo/Network/P2P/RemoteNode.cs
index 845455aa..ca017117 100644
--- a/src/Neo/Network/P2P/RemoteNode.cs
+++ b/src/Neo/Network/P2P/RemoteNode.cs
@@ -170,7 +170,7 @@ namespace Neo.Network.P2P
OnSend(inventory);
break;
case Relay relay:
- OnRelay(relay.Inventory);
+ // OnRelay(relay.Inventory);
break;
case StartProtocol _:
OnStartProtocol();