[PAN-2946] remove dead parameter (#1825)

The TransactionReceipt type is not stored and it's functionality is covered by
the TransactionReceiptFactory.  The Root/Status values are divined by the
presence or absence of the state root value.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
Danno Ferrin 5 years ago committed by GitHub
parent 619ef24368
commit 9db2744795
  1. 2
      ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/MainnetProtocolSpecs.java
  2. 2
      ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/ProtocolSpec.java
  3. 10
      ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/ProtocolSpecBuilder.java
  4. 3
      ethereum/jsonrpc/src/test/java/tech/pegasys/pantheon/ethereum/jsonrpc/internal/methods/EthGetTransactionReceiptTest.java

@ -126,7 +126,6 @@ public abstract class MainnetProtocolSpecs {
.blockProcessorBuilder(MainnetBlockProcessor::new)
.blockValidatorBuilder(MainnetBlockValidator::new)
.blockImporterBuilder(MainnetBlockImporter::new)
.transactionReceiptType(TransactionReceiptType.ROOT)
.blockHeaderFunctions(new MainnetBlockHeaderFunctions())
.miningBeneficiaryCalculator(BlockHeader::getCoinbase)
.name("Frontier");
@ -260,7 +259,6 @@ public abstract class MainnetProtocolSpecs {
? MainnetProtocolSpecs::byzantiumTransactionReceiptFactoryWithReasonEnabled
: MainnetProtocolSpecs::byzantiumTransactionReceiptFactory)
.blockReward(BYZANTIUM_BLOCK_REWARD)
.transactionReceiptType(TransactionReceiptType.STATUS)
.name("Byzantium");
}

@ -73,7 +73,6 @@ public class ProtocolSpec<C> {
* @param transactionReceiptFactory the transactionReceiptFactory to use
* @param difficultyCalculator the difficultyCalculator to use
* @param blockReward the blockReward to use.
* @param transactionReceiptType the type of transaction receipt to use, one of
* @param miningBeneficiaryCalculator determines to whom mining proceeds are paid
* @param precompileContractRegistry all the pre-compiled contracts added
* @param skipZeroBlockRewards should rewards be skipped if it is zero
@ -93,7 +92,6 @@ public class ProtocolSpec<C> {
final TransactionReceiptFactory transactionReceiptFactory,
final DifficultyCalculator<C> difficultyCalculator,
final Wei blockReward,
final TransactionReceiptType transactionReceiptType,
final MiningBeneficiaryCalculator miningBeneficiaryCalculator,
final PrecompileContractRegistry precompileContractRegistry,
final boolean skipZeroBlockRewards) {

@ -53,7 +53,6 @@ public class ProtocolSpecBuilder<T> {
private BlockProcessorBuilder blockProcessorBuilder;
private BlockValidatorBuilder<T> blockValidatorBuilder;
private BlockImporterBuilder<T> blockImporterBuilder;
private TransactionReceiptType transactionReceiptType;
private String name;
private MiningBeneficiaryCalculator miningBeneficiaryCalculator;
private PrivacyParameters privacyParameters;
@ -192,12 +191,6 @@ public class ProtocolSpecBuilder<T> {
return this;
}
public ProtocolSpecBuilder<T> transactionReceiptType(
final TransactionReceiptType transactionReceiptType) {
this.transactionReceiptType = transactionReceiptType;
return this;
}
public ProtocolSpecBuilder<T> miningBeneficiaryCalculator(
final MiningBeneficiaryCalculator miningBeneficiaryCalculator) {
this.miningBeneficiaryCalculator = miningBeneficiaryCalculator;
@ -243,7 +236,6 @@ public class ProtocolSpecBuilder<T> {
.skipZeroBlockRewards(skipZeroBlockRewards)
.difficultyCalculator(difficultyCalculator)
.transactionReceiptFactory(transactionReceiptFactory)
.transactionReceiptType(transactionReceiptType)
.miningBeneficiaryCalculator(miningBeneficiaryCalculator)
.name(name);
}
@ -267,7 +259,6 @@ public class ProtocolSpecBuilder<T> {
checkNotNull(blockReward, "Missing block reward");
checkNotNull(difficultyCalculator, "Missing difficulty calculator");
checkNotNull(transactionReceiptFactory, "Missing transaction receipt factory");
checkNotNull(transactionReceiptType, "Missing transaction receipt type");
checkNotNull(name, "Missing name");
checkNotNull(miningBeneficiaryCalculator, "Missing Mining Beneficiary Calculator");
checkNotNull(protocolSchedule, "Missing protocol schedule");
@ -338,7 +329,6 @@ public class ProtocolSpecBuilder<T> {
transactionReceiptFactory,
difficultyCalculator,
blockReward,
transactionReceiptType,
miningBeneficiaryCalculator,
precompileContractRegistry,
skipZeroBlockRewards);

@ -32,7 +32,6 @@ import tech.pegasys.pantheon.ethereum.jsonrpc.internal.results.TransactionReceip
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.results.TransactionReceiptStatusResult;
import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule;
import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSpec;
import tech.pegasys.pantheon.ethereum.mainnet.TransactionReceiptType;
import tech.pegasys.pantheon.util.bytes.BytesValue;
import java.math.BigInteger;
@ -90,7 +89,6 @@ public class EthGetTransactionReceiptTest {
null,
null,
null,
TransactionReceiptType.ROOT,
BlockHeader::getCoinbase,
null,
false);
@ -110,7 +108,6 @@ public class EthGetTransactionReceiptTest {
null,
null,
null,
TransactionReceiptType.STATUS,
BlockHeader::getCoinbase,
null,
false);

Loading…
Cancel
Save