forked from XRPLF/rippled
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit introduces no functional changes but cleans up the code and shrinks the surface area by removing dead and unused code, leveraging std:: alternatives to hand-rolled code and improving comments and documentation.
- Loading branch information
1 parent
d025f3f
commit 5b5226d
Showing
25 changed files
with
357 additions
and
570 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
@startuml | ||
box "Server 1" | ||
participant timer1 as "std::timer" | ||
participant jq1 as "JobQueue" | ||
participant ib1 as "InboundTransactions" | ||
participant ta1 as "TransactionAcquire" | ||
participant pi1 as "PeerImp" | ||
end box | ||
|
||
box "Server 2" | ||
participant pi2 as "PeerImp" | ||
participant jq2 as "JobQueue" | ||
participant ib2 as "InboundTransactions" | ||
end box | ||
|
||
autoactivate on | ||
[-> ib1 : getSet(rootHash) | ||
ib1 -> ta1 : TransactionAcquire(rootHash) | ||
return | ||
ib1 -> ta1 : init(numPeers=2) | ||
ta1 -> ta1 : addPeers(limit=2) | ||
ta1 -> ta1 : onPeerAdded(peer) | ||
ta1 -> ta1 : trigger(peer) | ||
ta1 -> pi1 : send(TMGetLedger) | ||
return | ||
deactivate ta1 | ||
deactivate ta1 | ||
deactivate ta1 | ||
ta1 -> ta1 : setTimer() | ||
ta1 -> timer1 : wait(() -> TransactionAcquire.queueJob()) | ||
return | ||
deactivate ta1 | ||
return | ||
return empty SHAMap | ||
|
||
... | ||
pi1 -> pi2 : onMessage(TMGetLedger) | ||
pi2 -> jq2 : addJob(() -> PeerImp.getLedger(message)) | ||
return | ||
deactivate pi2 | ||
|
||
... | ||
jq2 -> pi2 : getLedger(message) | ||
pi2 -> ib2 : getSet(rootHash) | ||
||| | ||
return SHAMap | ||
pi2 -> pi2 : send(TMLedgerData) | ||
deactivate pi2 | ||
deactivate pi2 | ||
|
||
... | ||
pi2 -> pi1 : onMessage(TMLedgerData) | ||
pi1 -> jq1 : addJob(() -> InboundTransactions.gotData(hash, message)) | ||
return | ||
deactivate pi1 | ||
|
||
... | ||
jq1 -> ib1 : gotData(hash, message) | ||
ib1 -> ta1 : takeNodes(nodeIDs, blobs) | ||
return useful | invalid | ||
deactivate ib1 | ||
|
||
... | ||
timer1 -> ta1 : queueJob() | ||
ta1 -> jq1 : addJob(() -> TransactionAcquire.invokeOnTimer()) | ||
return | ||
deactivate ta1 | ||
|
||
... | ||
jq1 -> ta1 : invokeOnTimer() | ||
ta1 -> ta1 : onTimer() | ||
ta1 -> ta1 : addPeers(limit=1) | ||
ta1 -> ta1 : onPeerAdded(peer) | ||
ta1 -> ta1 : trigger(peer) | ||
note right: mComplete = true; | ||
deactivate ta1 | ||
deactivate ta1 | ||
deactivate ta1 | ||
deactivate ta1 | ||
deactivate ta1 | ||
@enduml |
Oops, something went wrong.