mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-10-17 07:11:36 +02:00
document contract account binding
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Test a wallet doing contracts with different accounts and switching between them
|
||||
//! Test that a contract stays with its original account after switching accounts
|
||||
// #[macro_use]
|
||||
extern crate grin_wallet_controller as wallet;
|
||||
extern crate grin_wallet_impls as impls;
|
||||
|
||||
@@ -38,6 +38,9 @@ is used for the fee estimate, so any required inputs need enough confirmations a
|
||||
A value of `0` allows unconfirmed non-coinbase outputs. Open contracts do not reserve funds,
|
||||
so a late-locked contract can fail if another transaction spends the available outputs first.
|
||||
|
||||
Each side's account is fixed when it first joins the contract. Changing the active account
|
||||
later does not affect setup or signing; they use the account stored in the context.
|
||||
|
||||
## View and revoke
|
||||
|
||||
`view` reads a slate or Slatepack and shows its inputs and outputs when present, fees,
|
||||
|
||||
@@ -62,8 +62,6 @@ Separating side effects until the 'save_step' part would make these functions mu
|
||||
- Add full API and RPC examples once the contract interface is stable.
|
||||
- Separate side effects out from the computation, as described above.
|
||||
- Store transactions in LMDB so they can be committed with the wallet state.
|
||||
- Decide whether `contract_accounts_switch.rs` is a legitimate scenario, or whether
|
||||
signing under a different account than setup should error.
|
||||
|
||||
### Side-effects
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@ pub struct ContractSetupArgsAPI {
|
||||
/// The human readable account name from which to draw outputs
|
||||
/// for the transaction, overriding whatever the active account is as set via the
|
||||
/// [`set_active_account`](../grin_wallet_api/owner/struct.Owner.html#method.set_active_account) method.
|
||||
/// Only used when creating the local contract context
|
||||
pub src_acct_name: Option<String>,
|
||||
/// The net change we will agree on. The amount is in nanogrins (`1 G = 1_000_000_000nG`).
|
||||
/// The value is positive when we are on the receiving end and negative when we are the sender.
|
||||
|
||||
Reference in New Issue
Block a user