Swich gas-price to 0 in many places

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2020-08-01 16:23:13 +02:00
parent 5bfee9875c
commit 81a65fe1bc
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA
7 changed files with 46 additions and 64 deletions

View File

@ -935,8 +935,6 @@ var slashConsensusFault = &cli.Command{
To: maddr,
From: def,
Value: types.NewInt(0),
GasPrice: types.NewInt(1),
GasLimit: 0,
Method: builtin.MethodsMiner.ReportConsensusFault,
Params: enc,
}

View File

@ -89,8 +89,6 @@ var noncefix = &cli.Command{
From: addr,
To: addr,
Value: types.NewInt(1),
GasLimit: 0,
GasPrice: types.NewInt(1),
Nonce: i,
}
smsg, err := api.WalletSignMessage(ctx, addr, msg)

View File

@ -72,8 +72,6 @@ var verifRegAddVerifierCmd = &cli.Command{
To: builtin.VerifiedRegistryActorAddr,
From: fromk,
Method: builtin.MethodsVerifiedRegistry.AddVerifier,
GasPrice: types.NewInt(1),
GasLimit: 0,
Params: params,
}

View File

@ -78,7 +78,6 @@ var actorSetAddrsCmd = &cli.Command{
To: maddr,
From: minfo.Worker,
Value: types.NewInt(0),
GasPrice: types.NewInt(1),
GasLimit: gasLimit,
Method: 18,
Params: params,

View File

@ -28,6 +28,7 @@ type MsigAPI struct {
MpoolAPI MpoolAPI
}
// TODO: remove gp (gasPrice) from arguemnts
func (a *MsigAPI) MsigCreate(ctx context.Context, req uint64, addrs []address.Address, duration abi.ChainEpoch, val types.BigInt, src address.Address, gp types.BigInt) (cid.Cid, error) {
lenAddrs := uint64(len(addrs))
@ -45,7 +46,7 @@ func (a *MsigAPI) MsigCreate(ctx context.Context, req uint64, addrs []address.Ad
}
if gp == types.EmptyInt {
gp = types.NewInt(1)
gp = types.NewInt(0)
}
// Set up constructor parameters for multisig
@ -77,9 +78,8 @@ func (a *MsigAPI) MsigCreate(ctx context.Context, req uint64, addrs []address.Ad
From: src,
Method: builtin.MethodsInit.Exec,
Params: enc,
GasPrice: gp,
GasLimit: 0,
Value: val,
GasPrice: gp,
}
// send the message out to the network
@ -125,8 +125,6 @@ func (a *MsigAPI) MsigPropose(ctx context.Context, msig address.Address, to addr
Value: types.NewInt(0),
Method: builtin.MethodsMultisig.Propose,
Params: enc,
GasLimit: 0,
GasPrice: types.NewInt(1),
}
smsg, err := a.MpoolAPI.MpoolPushMessage(ctx, msg)
@ -241,8 +239,6 @@ func (a *MsigAPI) msigApproveOrCancel(ctx context.Context, operation api.MsigPro
Value: types.NewInt(0),
Method: msigResponseMethod,
Params: enc,
GasLimit: 0,
GasPrice: types.NewInt(1),
}
smsg, err := a.MpoolAPI.MpoolPushMessage(ctx, msg)

View File

@ -125,8 +125,6 @@ func (s SealingAPIAdapter) StateComputeDataCommitment(ctx context.Context, maddr
To: builtin.StorageMarketActorAddr,
From: maddr,
Value: types.NewInt(0),
GasPrice: types.NewInt(0),
GasLimit: 0,
Method: builtin.MethodsMarket.ComputeDataCommitment,
Params: ccparams,
}

View File

@ -176,8 +176,6 @@ func (s *WindowPoStScheduler) checkNextRecoveries(ctx context.Context, dlIdx uin
Method: builtin.MethodsMiner.DeclareFaultsRecovered,
Params: enc,
Value: types.NewInt(0),
GasLimit: 0,
GasPrice: types.NewInt(2),
}
sm, err := s.api.MpoolPushMessage(ctx, msg)
@ -260,8 +258,6 @@ func (s *WindowPoStScheduler) checkNextFaults(ctx context.Context, dlIdx uint64,
Method: builtin.MethodsMiner.DeclareFaults,
Params: enc,
Value: types.NewInt(0), // TODO: Is there a fee?
GasLimit: 0,
GasPrice: types.NewInt(2),
}
sm, err := s.api.MpoolPushMessage(ctx, msg)
@ -462,7 +458,6 @@ func (s *WindowPoStScheduler) submitPost(ctx context.Context, proof *miner.Submi
Method: builtin.MethodsMiner.SubmitWindowedPoSt,
Params: enc,
Value: types.NewInt(1000), // currently hard-coded late fee in actor, returned if not late
GasPrice: types.NewInt(3),
}
// TODO: consider maybe caring about the output