Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ab34400
Initial draft of tip enum
Jun 19, 2019
d36dc9a
Fix local tests
Jun 19, 2019
a18be8c
Builds.
kianenigma Jun 22, 2019
55d39cf
Fix test build.
kianenigma Jun 22, 2019
a4e2816
Tratify tip.
kianenigma Jun 23, 2019
58ae208
Cleanup of checkedExt.
kianenigma Jun 23, 2019
c7fe8bf
More cleanup.
kianenigma Jun 23, 2019
e47bf96
Master.into()
kianenigma Jun 23, 2019
78dde21
Checked Tip + other fixes.
kianenigma Jun 27, 2019
7326e5a
Line width
kianenigma Jun 27, 2019
a568a9b
Update core/sr-primitives/src/generic/tip.rs
4meta5 Jun 28, 2019
b3f69cb
Fix build.
kianenigma Jun 28, 2019
557f6c5
Merge branch 'master' of github.com:paritytech/substrate into kiz-tx-tip
kianenigma Jun 28, 2019
8e713aa
Bump.
kianenigma Jun 28, 2019
b110af6
Merge branch 'kiz-tx-tip' of github.com:paritytech/substrate into kiz…
kianenigma Jun 28, 2019
23df80d
Some cleanup (+should pass the tests).
kianenigma Jun 30, 2019
83721a4
Fix sync test payload.
kianenigma Jun 30, 2019
bd28f0d
Fix subkey and factory sig
kianenigma Jun 30, 2019
120de20
revert back old unchecked ext type to NOT use tip.
kianenigma Jul 9, 2019
0d1de9d
Make balance associated type of payment.
kianenigma Jul 10, 2019
6836f6b
Optionize tip.
kianenigma Jul 10, 2019
7191a7d
Further cleanup.
kianenigma Jul 10, 2019
0846065
Further cleanup.
kianenigma Jul 10, 2019
12ecfcc
Master.into()
kianenigma Jul 10, 2019
bf99e73
Fix tests.
kianenigma Jul 10, 2019
4824776
remove balance as generic.
kianenigma Jul 10, 2019
fb42e4e
Update doc.
kianenigma Jul 10, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix sync test payload.
  • Loading branch information
kianenigma committed Jun 30, 2019
commit 83721a48a59f7f0e5582c2e6dc2d12bf47e4c361
5 changes: 3 additions & 2 deletions node/cli/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ mod tests {
use std::sync::Arc;
use consensus::CompatibleDigestItem;
use consensus_common::{Environment, Proposer, ImportBlock, BlockOrigin, ForkChoiceStrategy};
use node_primitives::DigestItem;
use node_primitives::{DigestItem, Balance};
use node_runtime::{Call, BalancesCall, UncheckedExtrinsic};
use parity_codec::{Compact, Encode, Decode};
use primitives::{
Expand Down Expand Up @@ -269,6 +269,7 @@ mod tests {
let payload = (
0,
Call::Balances(BalancesCall::transfer(RawAddress::Id(bob.public().0.into()), 69.into())),
Tip::default(),
Era::immortal(),
service.client().genesis_hash()
);
Expand Down Expand Up @@ -359,7 +360,7 @@ mod tests {

let function = Call::Balances(BalancesCall::transfer(to.into(), amount));
let era = Era::immortal();
let raw_payload = (Compact(index), function, era, genesis_hash);
let raw_payload = (Compact(index), function, Tip::<Balance>::default(), era, genesis_hash);
let signature = raw_payload.using_encoded(|payload| if payload.len() > 256 {
signer.sign(&blake2_256(payload)[..])
} else {
Expand Down
1 change: 1 addition & 0 deletions srml/executive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ where

// pay and burn the tip if provided.
let tip = xt.tip().value();
let weight = xt.weight(encoded_len);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is weight used for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an indicator that I will make the Weighable trait return the priority based on an arbitrary computation.


if !tip.is_zero() {
if Payment::make_raw_payment(sender, tip).is_err() {
Expand Down