I am writing a simple blockchain using python, currently have some trouble syncing my transactions pools which are holding transactions! I wrote a method that gets the other nodes awaiting transactions and adds them to the self.transactions
then when I mine a new block this pool would be empty. I know there must be some bugs but I want to know how to handle confirmations.
def syn(self):
network=self.nodes
for node in network:
otherts = requests.get(f'http://{node}/tspool')
response= otherts.json()
self.transactions+=response
note: the response has other nodes awaiting transaction