@@ -4,12 +4,14 @@ import (
44 "context"
55 "encoding/json"
66 "fmt"
7+ "math/big"
8+ "time"
9+
710 "github.com/KyberNetwork/ethrpc"
8- "github.com/KyberNetwork/kyberswap-dex-lib/pkg/entity"
911 "github.com/KyberNetwork/logger"
1012 "github.com/ethereum/go-ethereum/common"
11- "math/big"
12- "time "
13+
14+ "github.com/KyberNetwork/kyberswap-dex-lib/pkg/entity "
1315)
1416
1517type PoolTracker struct {
@@ -44,8 +46,7 @@ func (d *PoolTracker) GetNewPoolState(ctx context.Context, p entity.Pool) (entit
4446func (d * PoolTracker ) getClassicPoolState (ctx context.Context , p entity.Pool ) (entity.Pool , error ) {
4547 logger .WithFields (logger.Fields {
4648 "address" : p .Address ,
47- "type" : p .Type ,
48- }).Infof ("[Syncswap] Start getting new state of pool" )
49+ }).Infof ("[%s] Start getting new state of pool" , p .Type )
4950
5051 var (
5152 swapFee0To1 , swapFee1To0 * big.Int
@@ -121,17 +122,15 @@ func (d *PoolTracker) getClassicPoolState(ctx context.Context, p entity.Pool) (e
121122
122123 logger .WithFields (logger.Fields {
123124 "address" : p .Address ,
124- "type" : p .Type ,
125- }).Infof ("[Syncswap] Finish getting new state of pool" )
125+ }).Infof ("[%s] Finish getting new state of pool" , p .Type )
126126
127127 return p , nil
128128}
129129
130130func (d * PoolTracker ) getStablePoolState (ctx context.Context , p entity.Pool ) (entity.Pool , error ) {
131131 logger .WithFields (logger.Fields {
132132 "address" : p .Address ,
133- "type" : p .Type ,
134- }).Infof ("[Syncswap] Start getting new state of pool" )
133+ }).Infof ("[%s] Start getting new state of pool" , p .Type )
135134
136135 var (
137136 swapFee0To1 , swapFee1To0 * big.Int
@@ -224,8 +223,7 @@ func (d *PoolTracker) getStablePoolState(ctx context.Context, p entity.Pool) (en
224223
225224 logger .WithFields (logger.Fields {
226225 "address" : p .Address ,
227- "type" : p .Type ,
228- }).Infof ("[Syncswap] Finish getting new state of pool" )
226+ }).Infof ("[%s] Finish getting new state of pool" , p .Type )
229227
230228 return p , nil
231229}
0 commit comments