Skip to content

Commit

Permalink
initializing endtime for time lock arg
Browse files Browse the repository at this point in the history
  • Loading branch information
bret-fusion committed Dec 23, 2018
1 parent af79d5d commit ae46322
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions internal/ethapi/api_fsn.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func (args *TimeLockArgs) init() {
}

if args.EndTime == nil {
args.StartTime = new(hexutil.Uint64)
args.EndTime = new(hexutil.Uint64)
*(*uint64)(args.EndTime) = common.TimeLockForever
}
}
Expand Down Expand Up @@ -626,12 +626,8 @@ func (s *PrivateFusionAPI) BuyTicket(ctx context.Context, args BuyTicketArgs, pa
}
}

data, err := args.toData()
if err != nil {
return common.Hash{}, err
}
var param = common.FSNCallParam{Func: common.BuyTicketFunc, Data: data}
data, err = param.ToBytes()
var param = common.FSNCallParam{Func: common.BuyTicketFunc, Data: new(big.Int).SetUint64(start).Bytes()}
data, err := param.ToBytes()
if err != nil {
return common.Hash{}, err
}
Expand Down Expand Up @@ -1161,12 +1157,8 @@ func (s *FusionTransactionAPI) BuildBuyTicketTx(ctx context.Context, args BuyTic
}
}

data, err := args.toData()
if err != nil {
return nil, err
}
var param = common.FSNCallParam{Func: common.BuyTicketFunc, Data: data}
data, err = param.ToBytes()
var param = common.FSNCallParam{Func: common.BuyTicketFunc, Data: new(big.Int).SetUint64(start).Bytes()}
data, err := param.ToBytes()
if err != nil {
return nil, err
}
Expand Down

0 comments on commit ae46322

Please sign in to comment.