Skip to content

Commit

Permalink
fee estimation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
e-asphyx committed Sep 27, 2023
1 parent db4da81 commit 325e92b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions teztool/teztool.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func incCounter(x tz.BigUint) tz.BigUint {
var (
gasSafetyMargin = big.NewInt(100)
// https://gitlab.com/tezos/tezos/-/blob/master/src/proto_alpha/lib_delegate/baking_configuration.ml#L99
minimalFeesMutez = big.NewInt(200)
minimalFeesMutez = big.NewInt(100)
minimalMutezPerByte = big.NewInt(1)
minimalNanotezPerGasUnit = big.NewInt(100)
storageSafetyMargin = big.NewInt(20)
Expand Down Expand Up @@ -254,8 +254,15 @@ func (t *Tool) Fill(ctx context.Context, group *latest.UnsignedOperation, attrib
gasFee.Div(gasFee, big.NewInt(1000)) // nanotez*gas to utez*gas

for {
dummyGrp := latest.SignedOperation{
UnsignedOperation: latest.UnsignedOperation{
Branch: &tz.BlockHash{},
Contents: []latest.OperationContents{op},
},
Signature: &tz.GenericSignature{},
}
var buf bytes.Buffer
if err := encoding.Encode(&buf, op); err != nil {
if err := encoding.Encode(&buf, &dummyGrp); err != nil {
return err
}
opSize := buf.Len()
Expand Down

0 comments on commit 325e92b

Please sign in to comment.