Skip to content

Commit

Permalink
Send cheaper STO v0 when propertyId == distributionProperty
Browse files Browse the repository at this point in the history
  • Loading branch information
zathras-crypto committed Jun 20, 2016
1 parent 0769602 commit d59010e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/omnicore/createpayload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ std::vector<unsigned char> CreatePayload_SendToOwners(uint32_t propertyId, uint6
std::vector<unsigned char> payload;

uint16_t messageType = 3;
uint16_t messageVer = (distributionProperty == 0) ? 0 : 1;
uint16_t messageVer = (distributionProperty == 0 || propertyId == distributionProperty) ? 0 : 1;
mastercore::swapByteOrder16(messageType);
mastercore::swapByteOrder16(messageVer);
mastercore::swapByteOrder32(propertyId);
Expand All @@ -115,7 +115,7 @@ std::vector<unsigned char> CreatePayload_SendToOwners(uint32_t propertyId, uint6
PUSH_BACK_BYTES(payload, messageType);
PUSH_BACK_BYTES(payload, propertyId);
PUSH_BACK_BYTES(payload, amount);
if (distributionProperty != 0) {
if (distributionProperty != 0 && propertyId != distributionProperty) {
mastercore::swapByteOrder32(distributionProperty);
PUSH_BACK_BYTES(payload, distributionProperty);
}
Expand Down

0 comments on commit d59010e

Please sign in to comment.