@@ -108,7 +108,7 @@ func initProcessor() {
108108 wire .FChainID = common .NewHash ()
109109 wire .FChainID .SetBytes (common .FACTOID_CHAINID )
110110
111- FactoshisPerCredit = 666667 // .001 / .15 * 100000000 (assuming a Factoid is .15 cents, entry credit = .1 cents
111+ FactoshisPerCredit = 66666 // .001 / .15 * 100000000 (assuming a Factoid is .15 cents, entry credit = .1 cents
112112
113113 // init Directory Block Chain
114114 initDChain ()
@@ -226,14 +226,6 @@ func serveCtlMsgRequest(msg wire.FtmInternalMsg) error {
226226// Serve incoming msg from inMsgQueue
227227func serveMsgRequest (msg wire.FtmInternalMsg ) error {
228228
229- if msg .Command () == wire .CmdFBlock {
230- fblock , ok := msg .(* wire.MsgFBlock )
231- if ok {
232- fmt .Printf ("%s : Current chain height: %v\r " , time .Now ().Format (time .RFC3339 ), fblock .SC .GetDBHeight ())
233- }
234-
235- }
236-
237229 switch msg .Command () {
238230 case wire .CmdCommitChain :
239231 msgCommitChain , ok := msg .(* wire.MsgCommitChain )
@@ -314,6 +306,15 @@ func serveMsgRequest(msg wire.FtmInternalMsg) error {
314306
315307 plMgr .AddMyProcessListItem (msgEom , nil , msgEom .EOM_Type )
316308 }
309+ fmt .Printf ("\033 [s" ) // save the cursor position
310+ fmt .Printf ("\033 [1;0H%80s" ,"" )
311+ fmt .Printf ("\033 [2;0H%80s" ,"" )
312+ fmt .Printf ("\033 [3;0H Minute %2v: %20s Current chain height: %7v " ,
313+ msgEom .EOM_Type ,
314+ time .Now ().Format (time .RFC3339 ),
315+ dchain .NextDBHeight )
316+ fmt .Printf ("\033 [4;0H%80s" ,"" )
317+ fmt .Printf ("\033 [u" ) // restore the cursor positio
317318 }
318319
319320 case wire .CmdDirBlock :
0 commit comments