WIP: Feature/6/jeffreypicard/dockerize for deployment #7

Closed
jeffreypicard wants to merge 80 commits from feature/6/jeffreypicard/dockerize-for-deployment into master
Showing only changes of commit 9263ffb1b5 - Show all commits

View file

@ -1748,23 +1748,24 @@ func (state *gbtWorkState) blockTemplateResult(useCoinbaseValue bool, submitOld
targetDifficulty := fmt.Sprintf("%064x", blockchain.CompactToBig(header.Bits)) targetDifficulty := fmt.Sprintf("%064x", blockchain.CompactToBig(header.Bits))
templateID := encodeTemplateID(state.prevHash, state.lastGenerated) templateID := encodeTemplateID(state.prevHash, state.lastGenerated)
reply := btcjson.GetBlockTemplateResult{ reply := btcjson.GetBlockTemplateResult{
Bits: strconv.FormatInt(int64(header.Bits), 16), Bits: strconv.FormatInt(int64(header.Bits), 16),
CurTime: header.Timestamp.Unix(), CurTime: header.Timestamp.Unix(),
Height: int64(template.Height), Height: int64(template.Height),
PreviousHash: header.PrevBlock.String(), PreviousHash: header.PrevBlock.String(),
WeightLimit: blockchain.MaxBlockWeight, WeightLimit: blockchain.MaxBlockWeight,
SigOpLimit: blockchain.MaxBlockSigOpsCost, SigOpLimit: blockchain.MaxBlockSigOpsCost,
SizeLimit: wire.MaxBlockPayload, SizeLimit: wire.MaxBlockPayload,
Transactions: transactions, Transactions: transactions,
Version: header.Version, Version: header.Version,
LongPollID: templateID, LongPollID: templateID,
SubmitOld: submitOld, SubmitOld: submitOld,
Target: targetDifficulty, Target: targetDifficulty,
MinTime: state.minTimestamp.Unix(), MinTime: state.minTimestamp.Unix(),
MaxTime: maxTime.Unix(), MaxTime: maxTime.Unix(),
Mutable: gbtMutableFields, Mutable: gbtMutableFields,
NonceRange: gbtNonceRange, NonceRange: gbtNonceRange,
Capabilities: gbtCapabilities, Capabilities: gbtCapabilities,
ClaimTrieHash: header.ClaimTrie.String(),
} }
// If the generated block template includes transactions with witness // If the generated block template includes transactions with witness
// data, then include the witness commitment in the GBT result. // data, then include the witness commitment in the GBT result.
@ -4663,5 +4664,8 @@ func (s *rpcServer) handleBlockchainNotification(notification *blockchain.Notifi
func init() { func init() {
rpcHandlers = rpcHandlersBeforeInit rpcHandlers = rpcHandlersBeforeInit
for key := range claimtrieHandlers {
rpcHandlers[key] = claimtrieHandlers[key]
}
rand.Seed(time.Now().UnixNano()) rand.Seed(time.Now().UnixNano())
} }