Skip to content

Commit 3e186c1

Browse files
authored
Merge pull request tronprotocol#2496 from tronprotocol/modify-delegation-mechanism-dev
modify the default brokerage to 20
2 parents 0266e25 + d5e5c02 commit 3e186c1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎src/main/java/org/tron/core/db/DelegationStore.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
public class DelegationStore extends TronStoreWithRevoking<BytesCapsule> {
1414

1515
public static final long REMARK = -1L;
16+
public static final int DEFAULT_BROKERAGE = 20;
1617

1718
@Autowired
1819
public DelegationStore(@Value("delegation") String dbName) {
@@ -96,7 +97,7 @@ public void setBrokerage(long cycle, byte[] address, int brokerage) {
9697
public int getBrokerage(long cycle, byte[] address) {
9798
BytesCapsule bytesCapsule = get(buildBrokerageKey(cycle, address));
9899
if (bytesCapsule == null) {
99-
return 0;
100+
return DEFAULT_BROKERAGE;
100101
} else {
101102
return ByteArray.toInt(bytesCapsule.getData());
102103
}

0 commit comments

Comments
 (0)