Rename from account userdata to data (#8224)

This commit is contained in:
Jack May
2020-02-11 16:30:22 -08:00
committed by GitHub
parent 72b11081a4
commit 059764586a
7 changed files with 30 additions and 30 deletions

View File

@ -18,17 +18,17 @@ extern uint64_t entrypoint(const uint8_t *input) {
switch (params.data[0]) {
case(1):
sol_log("modify first account userdata");
ka[2].userdata[0] = 1;
sol_log("modify first account data");
ka[2].data[0] = 1;
break;
case(2):
sol_log("modify first account userdata");
ka[3].userdata[0] = 2;
sol_log("modify first account data");
ka[3].data[0] = 2;
break;
case(3):
sol_log("modify both account userdata");
ka[2].userdata[0] += 1;
ka[3].userdata[0] += 2;
sol_log("modify both account data");
ka[2].data[0] += 1;
ka[3].data[0] += 2;
break;
case(4):
sol_log("modify first account lamports");

View File

@ -386,7 +386,7 @@ pub enum AccountState {
Verification(Proof),
// Account holds a HeaderStore structure
Headers(HeaderAccountInfo),
// Account's userdata is Unallocated
// Account's data is Unallocated
Unallocated,
// Invalid
Invalid,

View File

@ -211,7 +211,7 @@ pub fn check_trade(side: OrderSide, tokens: u64, price: u64) -> Result<(), Excha
/// Type of exchange account, account's user data is populated with this enum
#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub enum ExchangeState {
/// Account's Userdata is unallocated
/// Account's data is unallocated
Unallocated,
// Token account
Account(TokenAccountInfo),