Ejemplo n.º 1
0
 // FIXME: why do we need version parameter?
 // it shouldn't be called "version" because the it a field with the same name
 public void UpdateSignature(Key key)
 {
     if (key == null)
     {
         throw new ArgumentNullException("key");
     }
     UpdatePayload();
     signature = new VarString(key.Sign(Hashes.Hash256(payload.GetString())).ToDER());
 }
Ejemplo n.º 2
0
        private void UpdatePayload(BitcoinStream stream)
        {
            MemoryStream ms    = new MemoryStream();
            var          seria = new BitcoinStream(ms, true);

            seria.CopyParameters(stream);
            ReadWritePayloadFields(seria);
            payload = new VarString(ms.ToArray());
        }