Merge pull request #10081 from filecoin-project/steb/remove-dead-code

itests: remove dead code from DeployContract
This commit is contained in:
Geoff Stuart 2023-02-01 18:06:58 -05:00 committed by GitHub
commit 12ca08d9a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,16 +43,9 @@ func (f *TestFullNode) EVM() *EVM {
}
func (e *EVM) DeployContract(ctx context.Context, sender address.Address, bytecode []byte) eam.CreateReturn {
var err error
require := require.New(e.t)
nonce, err := e.MpoolGetNonce(ctx, sender)
if err != nil {
nonce = 0 // assume a zero nonce on error (e.g. sender doesn't exist).
}
var salt [32]byte
binary.BigEndian.PutUint64(salt[:], nonce)
method := builtintypes.MethodsEAM.CreateExternal
initcode := abi.CborBytes(bytecode)
params, err := actors.SerializeParams(&initcode)