public override bool IsValid(IList <Block> chain)
        {
            if (!base.IsValid(chain))
            {
                return(false);
            }

            var registered = chain.Where(b => b.Communities != null).Any(b => b.Communities.Any(t => t.Id == CommunityId && t.Address.SequenceEqual(PublicKey)));

            if (!registered)
            {
                Messages.Add($"La PublicKey {PublicKey.ByteArrayToHexString()} no es dueña de la comunidad {CommunityId:n}");
            }

            return(registered);
        }
Beispiel #2
0
 public override string ToString()
 {
     return($"{Name} ({PublicKey.ByteArrayToHexString()})");
 }