pub fn new_tx_slate<T: ?Sized, C, K>(
	wallet: &mut T,
	amount: u64,
	num_participants: usize,
	use_test_rng: bool,
) -> Result<Slate, Error>
where
	T: WalletBackend<C, K>,
	C: NodeClient,
	K: Keychain,
{
	let current_height = wallet.w2n_client().get_chain_height()?;
	let mut slate = Slate::blank(num_participants);
	if use_test_rng {
		{
			let sc = SLATE_COUNTER.lock();
			let bytes = [4, 54, 67, 12, 43, 2, 98, 76, 32, 50, 87, 5, 1, 33, 43, *sc];
			slate.id = Uuid::from_slice(&bytes).unwrap();
		}
		*SLATE_COUNTER.lock() += 1;
	}
	slate.amount = amount;
	slate.height = current_height;

	// Set the lock_height explicitly to 0 here.
	// This will generate a Plain kernel (rather than a HeightLocked kernel).
	slate.lock_height = 0;

	Ok(slate)
}
/// Creates a new slate for a transaction, can be called by anyone involved in
/// the transaction (sender(s), receiver(s))
Creates a new slate for a transaction, can be called by anyone involved in
the transaction (sender(s), receiver(s))
Creates a new slate for a transaction can be called by anyone involved in the transaction ( sender ( s ) receiver ( s ))
pub fn new_tx_slate<T: ?Sized, C, K>(
	wallet: &mut T,
	amount: u64,
	num_participants: usize,
	use_test_rng: bool,
) -> Result<Slate, Error>
where
	T: WalletBackend<C, K>,
	C: NodeClient,
	K: Keychain,
{
	let current_height = wallet.w2n_client().get_chain_height()?;
	let mut slate = Slate::blank(num_participants);
	if use_test_rng {
		{
			let sc = SLATE_COUNTER.lock();
			let bytes = [4, 54, 67, 12, 43, 2, 98, 76, 32, 50, 87, 5, 1, 33, 43, *sc];
			slate.id = Uuid::from_slice(&bytes).unwrap();
		}
		*SLATE_COUNTER.lock() += 1;
	}
	slate.amount = amount;
	slate.height = current_height;
	// Set the lock_height explicitly to 0 here.
	// This will generate a Plain kernel (rather than a HeightLocked kernel).
	slate.lock_height = 0;
	Ok(slate)
}
pub fn new_tx_slate < T : ? Sized , C , K > ( wallet : & mut T , amount : u64 , num_participants : usize , use_test_rng : bool , ) -> Result < Slate , Error > where T : WalletBackend < C , K > , C : NodeClient , K : Keychain , { let current_height = wallet . w2n_client ( ) . get_chain_height ( ) ? ; let mut slate = Slate :: blank ( num_participants ) ; if use_test_rng { { let sc = SLATE_COUNTER . lock ( ) ; let bytes = [ 4 , 54 , 67 , 12 , 43 , 2 , 98 , 76 , 32 , 50 , 87 , 5 , 1 , 33 , 43 , * sc ] ; slate . id = Uuid :: from_slice ( & bytes ) . unwrap ( ) ; } * SLATE_COUNTER . lock ( ) += 1 ; } slate . amount = amount ; slate . height = current_height ; // Set the lock_height explicitly to 0 here. // This will generate a Plain kernel (rather than a HeightLocked kernel). slate . lock_height = 0 ; Ok ( slate ) }
Creates a new slate for a transaction, can be called by anyone involved in
the transaction (sender(s), receiver(s))
Creates a new slate for a transaction can be called by anyone involved in the transaction ( sender ( s ) receiver ( s ))
wallet
&mut T
amount
u64
num_participants
usize
use_test_rng
bool