1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
crate::ix!();

pub struct Recipient {

    script_pub_key:           Script,
    n_amount:                 Amount,
    subtract_fee_from_amount: bool,

    abort_rescan:           AtomicBool, // default = { false }

    /**
      | controlled by WalletRescanReserver
      |
      */
    scanning_wallet:        AtomicBool, // default = { false }

    scanning_start:         Atomic<i64>, // default = { 0 }
    scanning_progress:      Atomic<f64>, // default = { 0 }

    /**
      | The next scheduled rebroadcast of wallet
      | transactions.
      |
      */
    n_next_resend:          i64, // default = 0

    /**
      | Whether this wallet will submit newly
      | created transactions to the node's
      | mempool and prompt rebroadcasts (see
      | ResendWalletTransactions()).
      |
      */
    broadcast_transactions: bool, // default = false


    /**
      | Local time that the tip block was received.
      | Used to schedule wallet rebroadcasts.
      |
      */
    best_block_time:        Atomic<i64>, // default = { 0 }

    //TODO: #[GUARDED_BY(cs_wallet)]
    inner:                  RecipientInner,
}

pub struct RecipientInner {

    /**
      | the current wallet version: clients
      | below this version are not able to load
      | the wallet
      | 
      |
      */
    n_wallet_version:       i32, // default = { FEATURE_BASE }
    master_key:             KeyingMaterial,
}