message: [Core] Sign block with staking key if coinstake is 'cold' stake
diff: @@ -22,8 +22,10 @@ bool GetKeyIDFromUTXO(const CTxOut& txout, CKeyID& keyID)
  return false;
  if (whichType == TX_PUBKEY) {
  keyID = CPubKey(vSolutions[0]).GetID();
  - } else if (whichType == TX_PUBKEYHASH) {
  + } else if (whichType == TX_PUBKEYHASH || whichType == TX_COLDSTAKE) {
  keyID = CKeyID(uint160(vSolutions[0]));
  + } else {
  + return false;
  }
  return true;
  @@ -80,6 +82,12 @@ bool CheckBlockSignature(const CBlock& block)
  if (whichType == TX_PUBKEY || whichType == TX_PUBKEYHASH) {
  valtype& vchPubKey = vSolutions[0];
  pubkey = CPubKey(vchPubKey);
  + } else if (whichType == TX_COLDSTAKE) {
  + // pick the public key from the P2CS input
  + const CTxIn& txin = block.vtx[1].vin[0];
  + int start = 1 + (int) *txin.scriptSig.begin(); // skip sig
  + start += 1 + (int) *(txin.scriptSig.begin()+start); // skip flag
  + pubkey = CPubKey(txin.scriptSig.begin()+start+1, txin.scriptSig.end());
  }
  }
  