File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,8 +19,9 @@ func TestAveragePeriod(t *testing.T) {
1919 exit .GlobalExitHandler .AddCancel (cancel )
2020 _ = ctx
2121
22- fctDat , _ := os .Create ("FCT.tsv" )
23- defer fctDat .Close ()
22+ // Open a file to write values that can be pulled into a spreadsheet and plotted.
23+ //fctDat, _ := os.Create("FCT.tsv")
24+ //defer fctDat.Close()
2425
2526 // Get the config
2627 conf := viper .GetViper ()
@@ -38,14 +39,17 @@ func TestAveragePeriod(t *testing.T) {
3839 for i := uint32 (208500 ); i < 210500 ; i ++ {
3940
4041 averages := n .GetPegNetRateAverages (ctx , i ).(map [fat2.PTicker ]uint64 )
42+ _ = averages
43+
4144 for pAsset , v := range averages {
4245 fmt .Sprintf ("%6s %15d" , pAsset , v )
4346 }
4447 // Get the rate for FCT at the current height
4548 price := n .LastAveragesData [fat2 .PTickerFCT ][len (n .LastAveragesData [fat2 .PTickerFCT ])- 1 ]
4649 avgPrice := averages [fat2 .PTickerFCT ]
47- fctDat .WriteString (fmt .Sprintf ("%f\t %f\n " , float64 (price )/ 100000000 , float64 (avgPrice )/ 100000000 ))
48- _ = averages
50+
51+ // Write out a tab delineated file to plot to double check the averages against the values
52+ // fctDat.WriteString(fmt.Sprintf("%f\t%f\n", float64(price)/100000000, float64(avgPrice)/100000000))
4953
5054 if i % 10000 == 0 {
5155 fmt .Printf ("%6d " , i )
You can’t perform that action at this time.
0 commit comments