Allow modules to indicate full block. (#1687)

* Add transaction skipping.

* Update runtime.
This commit is contained in:
Tomasz Drwięga
2019-02-08 15:35:48 +01:00
committed by Gav Wood
parent 091e222d99
commit 83f9e1e720
7 changed files with 43 additions and 9 deletions
+11 -2
View File
@@ -14,8 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
//! System manager: Handles all of the top-level stuff; executing block/transaction, setting code
//! and depositing logs.
//! Runtime Modules shared primitive types.
#![warn(missing_docs)]
@@ -44,6 +43,16 @@ pub mod traits;
pub mod generic;
pub mod transaction_validity;
/// Full block error message.
///
/// This allows modules to indicate that given transaction is potentially valid
/// in the future, but can't be executed in the current state.
/// Note this error should be returned early in the execution to prevent DoS,
/// cause the fees are not being paid if this error is returned.
///
/// Example: block gas limit is reached (the transaction can be retried in the next block though).
pub const BLOCK_FULL: &str = "block size limit is reached";
/// Justification type.
pub type Justification = Vec<u8>;