Address a few more comments.
This commit is contained in:
parent
ffe0b09890
commit
bd7a100ebb
1 changed files with 6 additions and 6 deletions
12
rpcserver.go
12
rpcserver.go
|
@ -1282,12 +1282,12 @@ func decodeTemplateID(templateID string) (*btcwire.ShaHash, int64, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, 0, errors.New("invalid longpollid format")
|
return nil, 0, errors.New("invalid longpollid format")
|
||||||
}
|
}
|
||||||
lastGenerated, err := strconv.Atoi(fields[1])
|
lastGenerated, err := strconv.ParseInt(fields[1], 10, 64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, 0, errors.New("invalid longpollid format")
|
return nil, 0, errors.New("invalid longpollid format")
|
||||||
}
|
}
|
||||||
|
|
||||||
return prevHash, int64(lastGenerated), nil
|
return prevHash, lastGenerated, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// notifyLongPollers notifies any channels that have been registered to be
|
// notifyLongPollers notifies any channels that have been registered to be
|
||||||
|
@ -1455,7 +1455,7 @@ func (state *gbtWorkState) updateBlockTemplate(s *rpcServer, useCoinbaseValue bo
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errStr := fmt.Sprintf("Failed to create new block "+
|
errStr := fmt.Sprintf("Failed to create new block "+
|
||||||
"template: %v", err)
|
"template: %v", err)
|
||||||
rpcsLog.Errorf(errStr)
|
rpcsLog.Error(errStr)
|
||||||
return btcjson.Error{
|
return btcjson.Error{
|
||||||
Code: btcjson.ErrInternal.Code,
|
Code: btcjson.ErrInternal.Code,
|
||||||
Message: errStr,
|
Message: errStr,
|
||||||
|
@ -1667,7 +1667,7 @@ func (state *gbtWorkState) blockTemplateResult(useCoinbaseValue bool, submitOld
|
||||||
Code: btcjson.ErrInternal.Code,
|
Code: btcjson.ErrInternal.Code,
|
||||||
Message: "A coinbase transaction has been " +
|
Message: "A coinbase transaction has been " +
|
||||||
"requested, but the server has not " +
|
"requested, but the server has not " +
|
||||||
"been configured with a payment " +
|
"been configured with any payment " +
|
||||||
"addresses via --miningaddr",
|
"addresses via --miningaddr",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1828,7 +1828,7 @@ func handleGetBlockTemplateRequest(s *rpcServer, request *btcjson.TemplateReques
|
||||||
Code: btcjson.ErrInternal.Code,
|
Code: btcjson.ErrInternal.Code,
|
||||||
Message: "A coinbase transaction has been requested, " +
|
Message: "A coinbase transaction has been requested, " +
|
||||||
"but the server has not been configured with " +
|
"but the server has not been configured with " +
|
||||||
"a payment addresses via --miningaddr",
|
"any payment addresses via --miningaddr",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2470,7 +2470,7 @@ func handleGetWorkRequest(s *rpcServer) (interface{}, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errStr := fmt.Sprintf("Failed to create new block "+
|
errStr := fmt.Sprintf("Failed to create new block "+
|
||||||
"template: %v", err)
|
"template: %v", err)
|
||||||
rpcsLog.Errorf(errStr)
|
rpcsLog.Error(errStr)
|
||||||
return nil, btcjson.Error{
|
return nil, btcjson.Error{
|
||||||
Code: btcjson.ErrInternal.Code,
|
Code: btcjson.ErrInternal.Code,
|
||||||
Message: errStr,
|
Message: errStr,
|
||||||
|
|
Loading…
Add table
Reference in a new issue