@@ -108,7 +108,7 @@ func (state *trackConfigState) checkLatestConfigDetails() (
108108
109109 changedInBlockl , latestConfigDigestl , err1 := state .configTracker .LatestConfigDetails (ctx )
110110 latestBlockHeight , err2 := state .configTracker .LatestBlockHeight (ctx )
111- config , err3 := state .configTracker .LatestConfig (ctx , latestBlockHeight )
111+ config , err3 := state .configTracker .LatestConfig (ctx , changedInBlockl )
112112
113113 fmt .Printf ("changedInBlock: %v\n " , changedInBlockl )
114114 fmt .Printf ("latestConfigDigest: %v\n " , latestConfigDigestl )
@@ -126,20 +126,25 @@ func (state *trackConfigState) checkLatestConfigDetails() (
126126 })
127127 return nil , false
128128 }
129- fmt .Println ("This is a debug trial line" )
129+ fmt .Println ("This is a debug trial line 1 " )
130130
131131 if latestConfigDigest == (types.ConfigDigest {}) {
132132 state .logger .Warn ("TrackConfig: LatestConfigDetails() returned a zero configDigest, oh crap. Looks like the contract has not been configured" , commontypes.LogFields {
133133 "configDigest" : latestConfigDigest ,
134134 })
135135 return nil , false
136136 }
137+
138+ fmt .Println ("This is a debug trial line 2" )
137139 if state .configDigest == latestConfigDigest {
138140 return nil , false
139141 }
142+
143+ fmt .Println ("This is a debug trial line 3" )
140144 if ! state .localConfig .SkipContractConfigConfirmations && blockheight < changedInBlock + uint64 (state .localConfig .ContractConfigConfirmations )- 1 {
141145 return nil , true
142146 }
147+ fmt .Println ("This is a debug trial line 4" )
143148
144149 contractConfig , err := state .configTracker .LatestConfig (ctx , changedInBlock )
145150 if err != nil {
@@ -149,6 +154,8 @@ func (state *trackConfigState) checkLatestConfigDetails() (
149154 return nil , true
150155 }
151156
157+ fmt .Println ("This is a debug trial line 5" )
158+
152159 if latestConfigDigest != contractConfig .ConfigDigest {
153160 state .logger .Error ("TrackConfig: received config change with ConfigDigest mismatch" , commontypes.LogFields {
154161 "error" : err ,
@@ -158,6 +165,8 @@ func (state *trackConfigState) checkLatestConfigDetails() (
158165 return nil , false
159166 }
160167
168+ fmt .Println ("This is a debug trial line 6" )
169+
161170 // Ignore configs where the configDigest doesn't match, they might have
162171 // been corrupted somehow.
163172 if err := state .configDigester .CheckContractConfig (ctx , contractConfig ); err != nil {
@@ -168,6 +177,8 @@ func (state *trackConfigState) checkLatestConfigDetails() (
168177 return nil , false
169178 }
170179
180+ fmt .Println ("This is a debug trial line 5" )
181+
171182 return & contractConfig , false
172183}
173184
0 commit comments