Compare commits

..

No commits in common. "master" and "v0.12.20" have entirely different histories.

3 changed files with 12 additions and 5 deletions

View File

@ -33,7 +33,7 @@ type server struct {
rpcClient *rpcclient.RPCClient // RPC client for ongoing user requests
backgroundRPCClient *rpcclient.RPCClient // RPC client dedicated for address and UTXO background fetching
params *dagconfig.Params
coinbaseMaturity uint64 // Different from go-kaspad default following Crescendo
coinbaseMaturity uint64 // Is different from default if we use testnet-11
lock sync.RWMutex
utxosSortedByAmount []*walletUTXO
@ -96,8 +96,15 @@ func Start(params *dagconfig.Params, listen, rpcServer string, keysFilePath stri
return err
}
// Post-Crescendo coinbase maturity
coinbaseMaturity := uint64(1000)
dagInfo, err := rpcClient.GetBlockDAGInfo()
if err != nil {
return nil
}
coinbaseMaturity := params.BlockCoinbaseMaturity
if dagInfo.NetworkName == "kaspa-testnet-11" {
coinbaseMaturity = 1000
}
serverInstance := &server{
rpcClient: rpcClient,

View File

@ -210,7 +210,7 @@ func getOutputsHash(tx *externalapi.DomainTransaction, inputIndex int, hashType
}
func getPayloadHash(tx *externalapi.DomainTransaction, reusedValues *SighashReusedValues) *externalapi.DomainHash {
if tx.SubnetworkID.Equal(&subnetworks.SubnetworkIDNative) && len(tx.Payload) == 0 {
if tx.SubnetworkID.Equal(&subnetworks.SubnetworkIDNative) {
return externalapi.NewZeroHash()
}

View File

@ -11,7 +11,7 @@ const validCharacters = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs
const (
appMajor uint = 0
appMinor uint = 12
appPatch uint = 22
appPatch uint = 20
)
// appBuild is defined as a variable so it can be overridden during the build