Exemplo n.º 1
0
        public NeoInterop(TokenSwapper swapper, NeoAPI neoAPI, PBigInteger interopBlockHeight, bool quickSync)
            : base(swapper, NeoWallet.NeoPlatform)
        {
            string lastBlockHeight = OracleReader.GetCurrentHeight("neo", "neo");

            if (string.IsNullOrEmpty(lastBlockHeight))
            {
                OracleReader.SetCurrentHeight("neo", "neo", new BigInteger(interopBlockHeight.ToUnsignedByteArray()).ToString());
            }

            this.quickSync = quickSync;

            Logger.Message($"interopHeight: {OracleReader.GetCurrentHeight("neo", "neo")}");
            this.neoAPI = neoAPI;

            this.lastScan = DateTime.UtcNow.AddYears(-1);;
        }