From c69949550f08b4b08eadea169f604f6e04f64dc5 Mon Sep 17 00:00:00 2001 From: muXxer Date: Wed, 28 Feb 2024 15:39:43 +0100 Subject: [PATCH] Fix ignoring of accounts in `AllotRemainingAccountBoundMana` --- builder/transaction_builder.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/builder/transaction_builder.go b/builder/transaction_builder.go index 9d8e20a26..0f8606ef2 100644 --- a/builder/transaction_builder.go +++ b/builder/transaction_builder.go @@ -177,13 +177,19 @@ func (b *TransactionBuilder) AllotRemainingAccountBoundMana(targetSlot iotago.Sl // allot all remaining account bound mana to the accounts, except the ignored accounts for accountID, mana := range remainingMana.AccountBoundMana { + ignoreAccount := false for _, ignoreAccountID := range ignoreAccountIDs { if accountID == ignoreAccountID { - // skip the ignored account - continue + ignoreAccount = true + break } } + if ignoreAccount { + // skip the ignored account + continue + } + // allot the mana to the account b.IncreaseAllotment(accountID, mana)