-
Notifications
You must be signed in to change notification settings - Fork 3
Block & Transaction broadcast #98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat! 👍 , added some comment answering the block signature verification todo
comment and some typo in constant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
waiting for test files
…erver, ReadAccountAddress
Please Review zoobc-schema/pull/28 |
Test cases CheckSignatureBlock
… 69-Block-Broadcast
Description
Implement Observer Pattern (for now used core services to & from p2p service). Add
SendBlock
&SendTransaction
inp2pCommunication
service to receive or send block & transaction to each peerBreakdown
observer
packageSendBlock
&SendTransaction
inp2pCommunication
serviceBlockPushed
listener : Call when has new block pushed ( and will send to peers)BlockReceived
listener : Call when received block from another peerTransactionAdded
listener: Call when new transaction inserted in mempoolTransactionReceived
listener: Call when received new transaction from another peerReference Issue
Closes #69 #70
Step to Test (optional)
.db
in./resource
pathgo run main.go -config-postfix 2
in first tab terminalgo run main.go
in second terminalzoobc_2.db
withzoobc.db
. (zoobc_2.db
act as receiver andzoobc.db
act as block creator and send block to listed peer)go run main.go -config-postfix 2
in first tab terminalgo run main.go
in second terminalclient.go
in./api/client/PostTransaction
path in third terminalclient.go
new transaction will save mempol inzoobc.db
and broadcast to the listed peerzoobc_2.db
withzoobc.db
.