Implement clone for some structs

This commit is contained in:
Aditya Kulkarni 2019-09-12 14:26:43 -07:00
parent 3ceefdf81c
commit 323182c4a5
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ enum OpCode {
}
/// A serialized script, used inside transparent inputs and outputs of a transaction.
#[derive(Debug, Default)]
#[derive(Clone, Debug, Default)]
pub struct Script(pub Vec<u8>);
impl Script {

View File

@ -19,7 +19,7 @@ const PHGR_PROOF_SIZE: usize = (33 + 33 + 65 + 33 + 33 + 33 + 33 + 33);
const ZC_NUM_JS_INPUTS: usize = 2;
const ZC_NUM_JS_OUTPUTS: usize = 2;
#[derive(Debug)]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct OutPoint {
pub hash: [u8; 32],
pub n: u32,
@ -79,7 +79,7 @@ impl TxIn {
}
}
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct TxOut {
pub value: Amount,
pub script_pubkey: Script,