Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
IxiAngel committed Oct 25, 2024
1 parent e91b004 commit ebe5628
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 34 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -329,3 +329,6 @@ ASALocalRun/

# MFractors (Xamarin productivity tool) working folder
.mfractor/

# Java keystore
*.jks
34 changes: 0 additions & 34 deletions Spixi/Network/NetworkProtocol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,40 +254,6 @@ public static void parseProtocolMessage(ProtocolMessageCode code, byte[] data, R
}
break;

case ProtocolMessageCode.balance:
{
using (MemoryStream m = new MemoryStream(data))
{
using (BinaryReader reader = new BinaryReader(m))
{
int address_length = reader.ReadInt32();
Address address = new Address(reader.ReadBytes(address_length));

// Retrieve the latest balance
IxiNumber balance = reader.ReadString();

if (address.SequenceEqual(IxianHandler.getWalletStorage().getPrimaryAddress()))
{
// Retrieve the blockheight for the balance
ulong block_height = reader.ReadUInt64();

if (block_height > Node.balance.blockHeight && (Node.balance.balance != balance || Node.balance.blockHeight == 0))
{
byte[] block_checksum = reader.ReadBytes(reader.ReadInt32());

Node.balance.address = address;
Node.balance.balance = balance;
Node.balance.blockHeight = block_height;
Node.balance.blockChecksum = block_checksum;
Node.balance.verified = false;
}
Node.balance.lastUpdate = Clock.getTimestamp();
}
}
}
}
break;

case ProtocolMessageCode.balance2:
{
using (MemoryStream m = new MemoryStream(data))
Expand Down

0 comments on commit ebe5628

Please sign in to comment.