Forbid appending blocks to forks that are competing with finalized chain (#138)

* Error::TryingToFinalizeSibling

* cargo fmt --all

* updated PruningStrategy comment
This commit is contained in:
Svyatoslav Nikolsky
2020-06-18 10:45:16 +03:00
committed by Bastian Köcher
parent a0c8206684
commit f5a00140cb
5 changed files with 297 additions and 69 deletions
+3
View File
@@ -60,6 +60,8 @@ pub enum Error {
TransactionsReceiptsMismatch = 18,
/// Can't accept unsigned header from the far future.
UnsignedTooFarInTheFuture = 19,
/// Trying to finalize sibling of finalized block.
TryingToFinalizeSibling = 20,
}
impl Error {
@@ -85,6 +87,7 @@ impl Error {
Error::RedundantTransactionsReceipts => "Redundant transactions receipts are provided",
Error::TransactionsReceiptsMismatch => "Invalid transactions receipts provided",
Error::UnsignedTooFarInTheFuture => "The unsigned header is too far in future",
Error::TryingToFinalizeSibling => "Trying to finalize sibling of finalized block",
}
}