fix: update NonceAccount to upstream changes

This commit is contained in:
Trent Nelson
2020-03-05 09:44:56 -07:00
committed by Michael Vines
parent 3b55087a86
commit 890e21c451
7 changed files with 43 additions and 18 deletions

View File

@ -4,6 +4,7 @@ import * as BufferLayout from 'buffer-layout';
import {encodeData, decodeData} from './instruction';
import * as Layout from './layout';
import {NONCE_ACCOUNT_LENGTH} from './nonce-account';
import {PublicKey} from './publickey';
import {SYSVAR_RECENT_BLOCKHASHES_PUBKEY, SYSVAR_RENT_PUBKEY} from './sysvar';
import {Transaction, TransactionInstruction} from './transaction';
@ -437,13 +438,6 @@ export class SystemProgram {
);
}
/**
* Max space of a Nonce account
*/
static get nonceSpace(): number {
return 68;
}
/**
* Generate a Transaction that creates a new account
*/
@ -530,7 +524,7 @@ export class SystemProgram {
fromPubkey: params.fromPubkey,
newAccountPubkey: params.noncePubkey,
lamports: params.lamports,
space: this.nonceSpace,
space: NONCE_ACCOUNT_LENGTH,
programId: this.programId,
});