Implement exchange of open transactions

This commit is contained in:
2024-03-20 22:23:26 +01:00
parent 0218e34787
commit c6394d2ca1
5 changed files with 233 additions and 8 deletions

View File

@@ -178,3 +178,24 @@ The node tells the miner "timestamp", "previous hash", "difficulty sum" and "tra
The miner fills "nonce", "message" and "miner pubkey" on its own.
When a miner finds a block, it sends a "block transfer" message to the node.
### Payment request (Client -> Node)
| content | size (bytes) |
|---|---|
| protocol version = 0 (BE) | 2 |
| capable version = 0 (BE) | 2 |
| type = 9 (BE) | 1 |
| transaction | 148 |
The node should answer to a "Payment request" with a "Payment request received" if the contained transaction is formally correct (see "validity / transaction" in the blockchain specification).
A response is always sent back in this case, even if the transaction cannot be applied to the blockchain right now.
### Payment request received (Node -> Client)
| content | size (bytes) |
|---|---|
| protocol version = 0 (BE) | 2 |
| capable version = 0 (BE) | 2 |
| type = 10 (BE) | 1 |