Cleanup transaction with offset (#1514)

* cleanup build::transaction_with_offset

* rustfmt
This commit is contained in:
Antioch Peverell
2018-09-12 12:17:36 +01:00
committed by GitHub
parent 07eefc4d6b
commit dca0d52dcd
5 changed files with 76 additions and 68 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ use grin_core::core::{Block, BlockHeader, CompactBlock, Transaction};
use grin_core::ser;
use grin_keychain::keychain::ExtKeychain;
use grin_keychain::Keychain;
use grin_wallet::libtx::build::{input, output, transaction_with_offset, with_fee};
use grin_wallet::libtx::build::{input, output, transaction, with_fee};
use grin_wallet::libtx::reward;
use std::fs::{self, File};
use std::path::Path;
@@ -69,7 +69,7 @@ fn tx() -> Transaction {
let key_id2 = keychain.derive_key_id(2).unwrap();
let key_id3 = keychain.derive_key_id(3).unwrap();
transaction_with_offset(
transaction(
vec![
input(10, key_id1),
input(11, key_id2),
+3 -3
View File
@@ -33,7 +33,7 @@ pub fn tx2i1o() -> Transaction {
let key_id2 = keychain.derive_key_id(2).unwrap();
let key_id3 = keychain.derive_key_id(3).unwrap();
build::transaction_with_offset(
build::transaction(
vec![
input(10, key_id1),
input(11, key_id2),
@@ -50,7 +50,7 @@ pub fn tx1i1o() -> Transaction {
let key_id1 = keychain.derive_key_id(1).unwrap();
let key_id2 = keychain.derive_key_id(2).unwrap();
build::transaction_with_offset(
build::transaction(
vec![input(5, key_id1), output(3, key_id2), with_fee(2)],
&keychain,
).unwrap()
@@ -65,7 +65,7 @@ pub fn tx1i2o() -> Transaction {
let key_id2 = keychain.derive_key_id(2).unwrap();
let key_id3 = keychain.derive_key_id(3).unwrap();
build::transaction_with_offset(
build::transaction(
vec![
input(6, key_id1),
output(3, key_id2),
+1 -1
View File
@@ -20,7 +20,7 @@ extern crate grin_wallet as wallet;
pub mod common;
use grin_core::core::{Output, OutputFeatures, Transaction};
use grin_core::core::{Output, OutputFeatures};
use grin_core::ser;
use keychain::{ExtKeychain, Keychain};
use wallet::libtx::proof;