koinos / koinos-p2p

The p2p microservice orchestrates the distribution of blocks and transactions between peers.
MIT License
6 stars 4 forks source link

Delay blocks that are too far in the future #231

Closed mvandeberg closed 1 year ago

mvandeberg commented 1 year ago

Resolves #230

Brief description

If a block is too far in the future, delay its application by a little bit, erroring if it is further in the future than the timeout allows for.

Checklist

Demonstration

$ go test ./...
?       github.com/koinos/koinos-p2p/cmd/koinos-p2p     [no test files]
ok      github.com/koinos/koinos-p2p/internal   (cached)
ok      github.com/koinos/koinos-p2p/internal/node      (cached)
?       github.com/koinos/koinos-p2p/internal/options   [no test files]
ok      github.com/koinos/koinos-p2p/internal/p2p       (cached)
?       github.com/koinos/koinos-p2p/internal/p2perrors [no test files]
?       github.com/koinos/koinos-p2p/internal/rpc       [no test files]