Submit (& sign) extrinsics from the runtime. (#3514)

* Abstract constructing extrinsic and signing.

* Initial impl of signer.

* Implement get payload.

* Clean up the code.

* Improve docs.

* Bump version.

* Update core/sr-primitives/src/generic/unchecked_extrinsic.rs

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>

* Fix tests & address grumbles.

* Fix build.

* Fix runtime tests.

* Fix bound test.

* Fix bound test.
This commit is contained in:
Tomasz Drwięga
2019-09-01 02:19:04 +02:00
committed by Gavin Wood
parent 0cae7217d8
commit feecfc856d
15 changed files with 346 additions and 71 deletions
+2 -1
View File
@@ -141,6 +141,7 @@ impl BlindCheckable for Extrinsic {
impl ExtrinsicT for Extrinsic {
type Call = Extrinsic;
type SignaturePayload = ();
fn is_signed(&self) -> Option<bool> {
if let Extrinsic::IncludeData(_) = *self {
@@ -150,7 +151,7 @@ impl ExtrinsicT for Extrinsic {
}
}
fn new_unsigned(call: Self::Call) -> Option<Self> {
fn new(call: Self::Call, _signature_payload: Option<Self::SignaturePayload>) -> Option<Self> {
Some(call)
}
}