Skip to content

Commit

Permalink
fix(core-transactions): apply genesis wallet exception to lastForgedB…
Browse files Browse the repository at this point in the history
…locks (#3440)
  • Loading branch information
air1one committed Feb 6, 2020
1 parent f20abf4 commit 6dbae81
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ export class DelegateRegistrationTransactionHandler extends TransactionHandler {

for (const block of lastForgedBlocks) {
const wallet = walletManager.findByPublicKey(block.generatorPublicKey);

// Genesis wallet is empty
if (!wallet.hasAttribute("delegate")) {
continue;
}

wallet.setAttribute("delegate.lastBlock", block);
}
}
Expand Down Expand Up @@ -121,7 +127,7 @@ export class DelegateRegistrationTransactionHandler extends TransactionHandler {
data: Interfaces.ITransactionData,
pool: TransactionPool.IConnection,
processor: TransactionPool.IProcessor,
): Promise<{ type: string, message: string } | null> {
): Promise<{ type: string; message: string } | null> {
const err = await this.typeFromSenderAlreadyInPool(data, pool);
if (err !== null) {
return err;
Expand Down

0 comments on commit 6dbae81

Please sign in to comment.