Skip to content

Commit

Permalink
Merge pull request #3044 from planetarium/chore/minor-fixes
Browse files Browse the repository at this point in the history
Minor fixes, update docstrings
  • Loading branch information
OnedgeLee authored Nov 26, 2024
2 parents 53b3165 + 8650fc7 commit f2c372e
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Lib9c/Action/Guild/Migration/GuildMigrationFailedException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Nekoyume.Action.Guild.Migration
{
/// <summary>
/// An exception to be thrown when guild migration failed.
/// </summary>
public class GuildMigrationFailedException : InvalidOperationException
{
public GuildMigrationFailedException(string message) : base(message)
Expand Down
3 changes: 3 additions & 0 deletions Lib9c/Action/Guild/Migration/LegacyModels/LegacyGuild.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
namespace Nekoyume.Action.Guild.Migration.LegacyModels
{
// TODO: [GuildMigration] Remove this class when the migration is done.
/// <summary>
/// The legacy model for Guild.
/// </summary>
public class LegacyGuild : IEquatable<LegacyGuild>, IBencodable
{
private const string StateTypeName = "guild";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
namespace Nekoyume.Action.Guild.Migration.LegacyModels
{
// TODO: [GuildMigration] Remove this class when the migration is done.
/// <summary>
/// The legacy model for GuildParticipant.
/// </summary>
public class LegacyGuildParticipant : IBencodable, IEquatable<LegacyGuildParticipant>
{
private const string StateTypeName = "guild_participant";
Expand Down
4 changes: 4 additions & 0 deletions Lib9c/Action/Guild/Migration/LegacyModels/MigrationModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

namespace Nekoyume.Action.Guild.Migration.LegacyModels
{
// TODO: [GuildMigration] Remove this class when the migration is done.
/// <summary>
/// The module for delegation height for migration.
/// </summary>
public static class MigrationModule
{
/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions Lib9c/Action/Guild/Migration/MigrateDelegation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ namespace Nekoyume.Action.Guild.Migration
// TODO: [GuildMigration] Remove this class when the migration is done.
/// <summary>
/// An action to migrate guild delegation.
/// After migration is done, guild participant now have delegation with
/// validator.
/// </summary>
[ActionType(TypeIdentifier)]
public class MigrateDelegation : ActionBase
Expand Down
1 change: 1 addition & 0 deletions Lib9c/Action/Guild/Migration/MigrateDelegationHeight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace Nekoyume.Action.Guild.Migration
// TODO: [GuildMigration] Remove this class when the migration is done.
/// <summary>
/// An action to migrate the delegation height.
/// This action triggers the migration of the delegation height.
/// </summary>
[ActionType(TypeIdentifier)]
public class MigrateDelegationHeight : ActionBase
Expand Down
1 change: 1 addition & 0 deletions Lib9c/Action/Guild/Migration/MigratePlanetariumGuild.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace Nekoyume.Action.Guild.Migration
// TODO: [GuildMigration] Remove this class when the migration is done.
/// <summary>
/// An action to migrate the planetarium guild.
/// After migration, the planetarium guild now has a validator to delegate.
/// </summary>
[ActionType(TypeIdentifier)]
public class MigratePlanetariumGuild : ActionBase
Expand Down
4 changes: 3 additions & 1 deletion Lib9c/Action/Guild/Migration/MigratePlanetariumValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ namespace Nekoyume.Action.Guild.Migration
{
// TODO: [GuildMigration] Remove this class when the migration is done.
/// <summary>
/// An action to migrate the planetarium guild.
/// An action to migrate the planetarium validator.
/// With this migration, planetarium validator is now active,
/// and bonded FAVs are moved to active address.
/// </summary>
[ActionType(TypeIdentifier)]
public class MigratePlanetariumValidator : ActionBase
Expand Down
2 changes: 1 addition & 1 deletion Lib9c/ValidatorDelegation/AbstainHistory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public List<PublicKey> FindToSlashAndAdd(IEnumerable<PublicKey> abstainList, lon
}
}

foreach (var history in History)
foreach (var history in History.ToArray())
{
history.Value.RemoveAll(abstainHeight => abstainHeight < lowerBound);
if (history.Value.Count == 0)
Expand Down

0 comments on commit f2c372e

Please sign in to comment.