Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ public class CommonParameter {

@Getter
@Setter
public boolean allowShieldedTransactionApi; // clearParam: true
public boolean allowShieldedTransactionApi; // clearParam: false
@Getter
@Setter
public long blockNumForEnergyLimit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public class NodeConfig {
private boolean unsolidifiedBlockCheck = false;
private int maxUnsolidifiedBlocks = 54;
private String zenTokenId = "000000";
private boolean allowShieldedTransactionApi = true;
private boolean allowShieldedTransactionApi = false;
private double activeConnectFactor = 0.1;
private double connectFactor = 0.6;
// Legacy alias `maxActiveNodesWithSameIp` has no bean field: we only peek at it via
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ public ZksnarkException() {
public ZksnarkException(String message) {
super(message);
}

public ZksnarkException(String message, Throwable cause) {
super(message, cause);
}
}
2 changes: 1 addition & 1 deletion common/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ node {
minParticipationRate = 0

# Whether to enable shielded transaction API
allowShieldedTransactionApi = true
allowShieldedTransactionApi = false

# Whether to print config log at startup
openPrintLog = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public void testLegacyAliasTakesPriorityOverModernKey() {
@Test
public void testShieldedApiDefaultsToTrueWhenNeitherKeySet() {
NodeConfig nc = NodeConfig.fromConfig(withRef());
assertTrue(nc.isAllowShieldedTransactionApi());
assertFalse(nc.isAllowShieldedTransactionApi());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package org.tron.core.exception;

import org.junit.Assert;
import org.junit.Test;

public class ZksnarkExceptionTest {

@Test
public void testNoArgConstructor() {
ZksnarkException e = new ZksnarkException();
Assert.assertNull(e.getMessage());
Assert.assertNull(e.getCause());
}

@Test
public void testMessageConstructor() {
ZksnarkException e = new ZksnarkException("boom");
Assert.assertEquals("boom", e.getMessage());
Assert.assertNull(e.getCause());
}

@Test
public void testMessageAndCauseConstructor() {
Throwable cause = new ArithmeticException("overflow");
ZksnarkException e = new ZksnarkException("wrapped", cause);
Assert.assertEquals("wrapped", e.getMessage());
Assert.assertSame(cause, e.getCause());
}
}
Loading
Loading