From e439c51e88c48417661c8e06775ddf2d9c1a547a Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Tue, 3 Apr 2018 11:55:11 -0500 Subject: [PATCH 1/3] Change IntegerVoteResult to LongVoteResult --- src/main/proto/pb.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/proto/pb.proto b/src/main/proto/pb.proto index e0d2f47..ac803cc 100644 --- a/src/main/proto/pb.proto +++ b/src/main/proto/pb.proto @@ -1440,7 +1440,7 @@ message RemoveAltcoinProposal { message VoteResult { oneof message { BooleanVoteResult boolean_vote_result = 1; - IntegerVoteResult integer_vote_result = 2; + LongVoteResult long_vote_result = 2; } } @@ -1448,8 +1448,8 @@ message BooleanVoteResult { bool accepted = 1; } -message IntegerVoteResult { - uint32 value = 1; +message LongVoteResult { + uint64 value = 1; } /////////////////////////////////////////////////////////////////////////////////////////// From cd2378a3c6af43a5266504942020e4348cb91329 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Tue, 3 Apr 2018 18:49:10 -0500 Subject: [PATCH 2/3] Use logErrorAndThrowIfDevMode, add cycle check - Use DevEnv.logErrorAndThrowIfDevMode to throw exception in dev mode - Add filter for isTxInCurrentCycle when republishing myVotes. - Add logs for successful or failed p2p network broadcast --- src/main/java/bisq/common/app/DevEnv.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/bisq/common/app/DevEnv.java b/src/main/java/bisq/common/app/DevEnv.java index 65dc002..243ed3d 100644 --- a/src/main/java/bisq/common/app/DevEnv.java +++ b/src/main/java/bisq/common/app/DevEnv.java @@ -17,6 +17,9 @@ package bisq.common.app; +import lombok.extern.slf4j.Slf4j; + +@Slf4j public class DevEnv { // Was used for P2P network stress test to adjust several setting for the tests (e.g. use lower btc fees for offers,..) public static final boolean STRESS_TEST_MODE = false; @@ -44,4 +47,10 @@ public static void setDevMode(boolean devMode) { public static final boolean DAO_PHASE2_ACTIVATED = false; public static final boolean DAO_TRADING_ACTIVATED = false; + + public static void logErrorAndThrowIfDevMode(String msg) { + log.error(msg); + if (devMode) + throw new RuntimeException(msg); + } } From fd3e121354a8d5c0b30eb736052ea52539ea29d3 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Tue, 3 Apr 2018 20:16:23 -0500 Subject: [PATCH 3/3] Remove nodeAddress from ProposalPayload as it is not needed --- src/main/proto/pb.proto | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main/proto/pb.proto b/src/main/proto/pb.proto index ac803cc..7ba80d5 100644 --- a/src/main/proto/pb.proto +++ b/src/main/proto/pb.proto @@ -1364,15 +1364,14 @@ message ProposalPayload { string title = 5; string description = 6; string link = 7; - string node_address = 8; - bytes owner_pub_key_encoded = 9; - string tx_id = 10; - map extra_data = 11; + bytes owner_pub_key_encoded = 8; + string tx_id = 9; + map extra_data = 10; oneof message { - CompensationRequestPayload compensation_request_payload = 12; - GenericProposalPayload generic_proposal_payload = 13; - ChangeParamProposalPayload change_param_proposal_payload = 14; - RemoveAltcoinProposalPayload remove_altcoin_proposal_payload = 15; + CompensationRequestPayload compensation_request_payload = 11; + GenericProposalPayload generic_proposal_payload = 12; + ChangeParamProposalPayload change_param_proposal_payload = 13; + RemoveAltcoinProposalPayload remove_altcoin_proposal_payload = 14; } }