Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/Neo/BigDecimal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,7 @@ public readonly bool Equals(BigDecimal other)

public override readonly int GetHashCode()
{
var divisor = BigInteger.Pow(10, _decimals);
var result = BigInteger.DivRem(_value, divisor, out var remainder);
return HashCode.Combine(result, remainder);
return HashCode.Combine(_decimals, _value.GetHashCode());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but why previous logic? any specific reason?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know

}

public static bool operator ==(BigDecimal left, BigDecimal right)
Expand Down