4
4
"context"
5
5
"errors"
6
6
"math/big"
7
+ "strings"
7
8
8
9
"github.com/ethereum/go-ethereum/accounts/abi/bind"
9
10
"github.com/ethereum/go-ethereum/core/types"
@@ -191,6 +192,8 @@ func (ipp *InitProvingPeriodTask) Do(taskID harmonytask.TaskID, stillOwned func(
191
192
return false , xerrors .Errorf ("failed to send transaction: %w" , err )
192
193
}
193
194
195
+ txHashLower := strings .ToLower (txHash .Hex ())
196
+
194
197
// Update the database in a transaction
195
198
_ , err = ipp .db .BeginTransaction (ctx , func (tx * harmonydb.Tx ) (bool , error ) {
196
199
// Update pdp_data_sets
@@ -200,7 +203,7 @@ func (ipp *InitProvingPeriodTask) Do(taskID harmonytask.TaskID, stillOwned func(
200
203
prev_challenge_request_epoch = $2,
201
204
prove_at_epoch = $3
202
205
WHERE id = $4
203
- ` , txHash . Hex () , ts .Height (), init_prove_at .Uint64 (), dataSetId )
206
+ ` , txHashLower , ts .Height (), init_prove_at .Uint64 (), dataSetId )
204
207
if err != nil {
205
208
return false , xerrors .Errorf ("failed to update pdp_data_sets: %w" , err )
206
209
}
@@ -212,7 +215,7 @@ func (ipp *InitProvingPeriodTask) Do(taskID harmonytask.TaskID, stillOwned func(
212
215
_ , err = tx .Exec (`
213
216
INSERT INTO message_waits_eth (signed_tx_hash, tx_status)
214
217
VALUES ($1, 'pending') ON CONFLICT DO NOTHING
215
- ` , txHash . Hex () )
218
+ ` , txHashLower )
216
219
if err != nil {
217
220
return false , xerrors .Errorf ("failed to insert into message_waits_eth: %w" , err )
218
221
}
0 commit comments