Skip to content
This repository has been archived by the owner on Jan 27, 2025. It is now read-only.

Commit

Permalink
Correction (#705)
Browse files Browse the repository at this point in the history
  • Loading branch information
simsekgokhan authored Sep 23, 2021
1 parent d7c83e9 commit 0b0ebf4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions language/diem-framework/modules/DiemAccount.move
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ module DiemAccount {
assert(MinerState::can_create_val_account(sender_addr), Errors::limit_exceeded(120102));
// Check there's enough balance for bootstrapping both operator and validator account
assert(
balance<GAS>(sender_addr) >= 2 * BOOTSTRAP_COIN_VALUE,
balance<GAS>(sender_addr) > 2 * BOOTSTRAP_COIN_VALUE,
Errors::limit_exceeded(EINSUFFICIENT_BALANCE)
);

Expand Down Expand Up @@ -1455,7 +1455,7 @@ module DiemAccount {
let balance_coin = &mut account_balance.coin;
// Doubly check balance exists.
assert(
Diem::value(balance_coin) >= BOOTSTRAP_COIN_VALUE,
Diem::value(balance_coin) > BOOTSTRAP_COIN_VALUE,
Errors::limit_exceeded(EINSUFFICIENT_BALANCE)
);
// Should abort if the
Expand Down
4 changes: 2 additions & 2 deletions language/diem-framework/modules/doc/DiemAccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,7 @@ Initialize this module. This is only callable from genesis.
<b>assert</b>(<a href="MinerState.md#0x1_MinerState_can_create_val_account">MinerState::can_create_val_account</a>(sender_addr), <a href="../../../../../../move-stdlib/docs/Errors.md#0x1_Errors_limit_exceeded">Errors::limit_exceeded</a>(120102));
// Check there's enough balance for bootstrapping both operator and validator account
<b>assert</b>(
<a href="DiemAccount.md#0x1_DiemAccount_balance">balance</a>&lt;<a href="GAS.md#0x1_GAS">GAS</a>&gt;(sender_addr) &gt;= 2 * <a href="DiemAccount.md#0x1_DiemAccount_BOOTSTRAP_COIN_VALUE">BOOTSTRAP_COIN_VALUE</a>,
<a href="DiemAccount.md#0x1_DiemAccount_balance">balance</a>&lt;<a href="GAS.md#0x1_GAS">GAS</a>&gt;(sender_addr) &gt; 2 * <a href="DiemAccount.md#0x1_DiemAccount_BOOTSTRAP_COIN_VALUE">BOOTSTRAP_COIN_VALUE</a>,
<a href="../../../../../../move-stdlib/docs/Errors.md#0x1_Errors_limit_exceeded">Errors::limit_exceeded</a>(<a href="DiemAccount.md#0x1_DiemAccount_EINSUFFICIENT_BALANCE">EINSUFFICIENT_BALANCE</a>)
);

Expand Down Expand Up @@ -2996,7 +2996,7 @@ subject to the dual attestation protocol
<b>let</b> balance_coin = &<b>mut</b> account_balance.coin;
// Doubly check balance <b>exists</b>.
<b>assert</b>(
<a href="Diem.md#0x1_Diem_value">Diem::value</a>(balance_coin) &gt;= <a href="DiemAccount.md#0x1_DiemAccount_BOOTSTRAP_COIN_VALUE">BOOTSTRAP_COIN_VALUE</a>,
<a href="Diem.md#0x1_Diem_value">Diem::value</a>(balance_coin) &gt; <a href="DiemAccount.md#0x1_DiemAccount_BOOTSTRAP_COIN_VALUE">BOOTSTRAP_COIN_VALUE</a>,
<a href="../../../../../../move-stdlib/docs/Errors.md#0x1_Errors_limit_exceeded">Errors::limit_exceeded</a>(<a href="DiemAccount.md#0x1_DiemAccount_EINSUFFICIENT_BALANCE">EINSUFFICIENT_BALANCE</a>)
);
// Should <b>abort</b> <b>if</b> the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,7 @@ Initialize this module. This is only callable from genesis.
<b>assert</b>(<a href="MinerState.md#0x1_MinerState_can_create_val_account">MinerState::can_create_val_account</a>(sender_addr), <a href="../../../../../../move-stdlib/docs/Errors.md#0x1_Errors_limit_exceeded">Errors::limit_exceeded</a>(120102));
// Check there's enough balance for bootstrapping both operator and validator account
<b>assert</b>(
<a href="DiemAccount.md#0x1_DiemAccount_balance">balance</a>&lt;<a href="GAS.md#0x1_GAS">GAS</a>&gt;(sender_addr) &gt;= 2 * <a href="DiemAccount.md#0x1_DiemAccount_BOOTSTRAP_COIN_VALUE">BOOTSTRAP_COIN_VALUE</a>,
<a href="DiemAccount.md#0x1_DiemAccount_balance">balance</a>&lt;<a href="GAS.md#0x1_GAS">GAS</a>&gt;(sender_addr) &gt; 2 * <a href="DiemAccount.md#0x1_DiemAccount_BOOTSTRAP_COIN_VALUE">BOOTSTRAP_COIN_VALUE</a>,
<a href="../../../../../../move-stdlib/docs/Errors.md#0x1_Errors_limit_exceeded">Errors::limit_exceeded</a>(<a href="DiemAccount.md#0x1_DiemAccount_EINSUFFICIENT_BALANCE">EINSUFFICIENT_BALANCE</a>)
);

Expand Down Expand Up @@ -2996,7 +2996,7 @@ subject to the dual attestation protocol
<b>let</b> balance_coin = &<b>mut</b> account_balance.coin;
// Doubly check balance <b>exists</b>.
<b>assert</b>(
<a href="Diem.md#0x1_Diem_value">Diem::value</a>(balance_coin) &gt;= <a href="DiemAccount.md#0x1_DiemAccount_BOOTSTRAP_COIN_VALUE">BOOTSTRAP_COIN_VALUE</a>,
<a href="Diem.md#0x1_Diem_value">Diem::value</a>(balance_coin) &gt; <a href="DiemAccount.md#0x1_DiemAccount_BOOTSTRAP_COIN_VALUE">BOOTSTRAP_COIN_VALUE</a>,
<a href="../../../../../../move-stdlib/docs/Errors.md#0x1_Errors_limit_exceeded">Errors::limit_exceeded</a>(<a href="DiemAccount.md#0x1_DiemAccount_EINSUFFICIENT_BALANCE">EINSUFFICIENT_BALANCE</a>)
);
// Should <b>abort</b> <b>if</b> the
Expand Down
Binary file not shown.

0 comments on commit 0b0ebf4

Please sign in to comment.