Skip to content

Commit 73c28d1

Browse files
committed
Rename check method
1 parent a985c17 commit 73c28d1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Lib9c/Action/TransferAsset.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,14 @@ public override IAccount Execute(IActionContext context)
118118
}
119119

120120
TransferAsset3.CheckCrystalSender(currency, context.BlockIndex, Sender);
121-
CheckRecipientIsStake(state, Recipient);
121+
ThrowIfStakeState(state, Recipient);
122122

123123
var ended = DateTimeOffset.UtcNow;
124124
Log.Debug("{AddressesHex}TransferAsset5 Total Executed Time: {Elapsed}", addressesHex, ended - started);
125125
return state.TransferAsset(context, Sender, Recipient, Amount);
126126
}
127127

128-
public static void CheckRecipientIsStake(IAccount state, Address recipient)
128+
public static void ThrowIfStakeState(IAccount state, Address recipient)
129129
{
130130
if (state.TryGetState(recipient, out IValue serializedStakeState))
131131
{

Lib9c/Action/TransferAssets.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ private IAccount Transfer(
160160
}
161161

162162
TransferAsset3.CheckCrystalSender(currency, blockIndex, Sender);
163-
TransferAsset.CheckRecipientIsStake(state, recipient);
163+
TransferAsset.ThrowIfStakeState(state, recipient);
164164
return state.TransferAsset(context, Sender, recipient, amount);
165165
}
166166
}

0 commit comments

Comments
 (0)