aboutsummaryrefslogtreecommitdiffstats
path: root/eth/gasprice.go
diff options
context:
space:
mode:
authorzsfelfoldi <zsfelfoldi@gmail.com>2015-06-29 19:48:10 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-06-30 00:53:04 +0800
commit5d9df7348d80fbd5de9a92d7f6abe6c02646c24d (patch)
treed98a93c563abd9a5d010c8458886b4d3a6dd3fd1 /eth/gasprice.go
parentac80ec59dc223c679639aaae9a42325e18cde9c8 (diff)
downloadgo-tangerine-5d9df7348d80fbd5de9a92d7f6abe6c02646c24d.tar.gz
go-tangerine-5d9df7348d80fbd5de9a92d7f6abe6c02646c24d.tar.zst
go-tangerine-5d9df7348d80fbd5de9a92d7f6abe6c02646c24d.zip
gpo non-existent block checks
Diffstat (limited to 'eth/gasprice.go')
-rw-r--r--eth/gasprice.go15
1 files changed, 11 insertions, 4 deletions
diff --git a/eth/gasprice.go b/eth/gasprice.go
index 44202d709..ddf1c8c09 100644
--- a/eth/gasprice.go
+++ b/eth/gasprice.go
@@ -47,14 +47,21 @@ func NewGasPriceOracle(eth *Ethereum) (self *GasPriceOracle) {
}
func (self *GasPriceOracle) processPastBlocks() {
- last := self.chain.CurrentBlock().NumberU64()
- first := uint64(0)
+ last := int64(-1)
+ cblock := self.chain.CurrentBlock()
+ if cblock != nil {
+ last = int64(cblock.NumberU64())
+ }
+ first := int64(0)
if last > gpoProcessPastBlocks {
first = last - gpoProcessPastBlocks
}
- self.firstProcessed = first
+ self.firstProcessed = uint64(first)
for i := first; i <= last; i++ {
- self.processBlock(self.chain.GetBlockByNumber(i))
+ block := self.chain.GetBlockByNumber(uint64(i))
+ if block != nil {
+ self.processBlock(block)
+ }
}
}
* Update to 2.2.2-BETA.Hajimu UMEMOTO2003-10-2915-63/+75 * fix incorrect PERL_LEVEL checkYen-Ming Lee2003-10-281-1/+1 * bump PORTREVISIONOliver Lehmann2003-10-284-4/+4 * Does not use the included version of libintl, use the one which is providedOliver Lehmann2003-10-288-16/+28 * Does not use the included version of libintl, use the one which is providedOliver Lehmann2003-10-282-6/+4 * BROKEN: Does not compileKris Kennaway2003-10-281-0/+2 * Back out previous upgrade because of incompatibility.Jun Kuriyama2003-10-285-58/+139 * Fix build on -CURRENT.Max Khon2003-10-287-49/+58 * use USE_MYSQLErwin Lansing2003-10-281-1/+1 * Mark $IGNORE if PERL_LEVEL < 500600.Jun Kuriyama2003-10-271-0/+3 * - Update to 0.9.9 (fixes a security problem)Sergei Kolobov2003-10-273-6/+36 * Homepage has changed; update MASTER_SITES and WWW:.Pete Fritchman2003-10-272-2/+2 * Update to 0.29.Pete Fritchman2003-10-273-2/+8 * - update to 1.1dPete Fritchman2003-10-262-2/+2 * - Fix the DOCSDIR and EXAMPLESDIR code. Now both can beKirill Ponomarev2003-10-268-16/+98 * - Fix the DOCSDIR and EXAMPLESDIR code. Now both can be set toKirill Ponomarev2003-10-262-9/+33 * - Fix maintainer's emailKirill Ponomarev2003-10-261-4/+1 * Upgrade to 6.200_02.Jun Kuriyama2003-10-265-138/+55 * - Convert USE_* variables to WITH_*Sergei Kolobov2003-10-261-9/+8 * - Add the new option "smime_encrypt_self" to addtionally encryptSergei Kolobov2003-10-265-20/+119 * Fix a bug where Evo would crash on exit on Sparc64. I'm not bumpingJoe Marcus Clarke2003-10-261-0/+20 * For perl < 5.6, add a runtime dependency on File::SpecDoug Barton2003-10-251-0/+1 * - Utilize CONFLICTSSergei Kolobov2003-10-242-0/+4 * Remove the recursive assignment of SITE_PERL to ${SITE_PERL} introducedErwin Lansing2003-10-247-7/+0 * utilize SITE_PERLYing-Chieh Liao2003-10-2466-418/+401 * - Update to 6.2.5 (see http://catb.org/~esr/fetchmail/NEWS for details)Sergei Kolobov2003-10-243-18/+17 * - Update to 1.2.1:Sergei Kolobov2003-10-2415-35/+30 * Fix format string bug, see http://www.guninski.com/sylph.html for more.Alexander Leidinger2003-10-234-0/+26 * - Apply vendor's security patchSergei Kolobov2003-10-232-0/+40 * Fix configure errorAndrey A. Chernov2003-10-232-0/+128 * - Update to version 0.3Kirill Ponomarev2003-10-234-76/+45 * Change to my @FreeBSD.org address.Sergei Kolobov2003-10-2317-17/+17 * Respect CC and CFLAGSKris Kennaway2003-10-233-0/+37 * - Unbreak build under -CURRENT:Sergei Kolobov2003-10-232-7/+32 * Update to exiscan-acl-4.24-13, which is a bugfix release.Sheldon Hearn2003-10-222-2/+7 * New port: mail/kshowmailKirill Ponomarev2003-10-226-0/+122 * Update to 0.7.Sergey A. Osokin2003-10-222-2/+2 * Update to 0.87Sergei Kolobov2003-10-222-10/+4 * Upgrade to 0.41Andrey A. Chernov2003-10-224-5/+40 * Don't override config file during installation.Yen-Ming Lee2003-10-201-3/+4 * - remove COPYINGDirk Meyer2003-10-202-2/+1 * - Update to 2.1.1Kirill Ponomarev2003-10-194-28/+31 * - Layout for GnuSTEP 1.8.0Dirk Meyer2003-10-193-126/+86 * Use ${PKGINSTALL} instead of pkg-install.Peter Pentchev2003-10-191-1/+1 * - introduce the make option WITH_TRASHQUOTAOliver Lehmann2003-10-191-1/+6 * Add p5-Mail-GnuPG 0.06,Vanilla I. Shu2003-10-175-0/+38 * Declare (or resolve) conflicts for KDE and QT.Michael Nottebrock2003-10-171-0/+3 * Add p5-Net-QMTP 0.05,Vanilla I. Shu2003-10-175-0/+39 * Add back previous maintainer: it seems the mail bounce was caused byKris Kennaway2003-10-161-1/+1 * Reset bouncing maintainer addressKris Kennaway2003-10-161-1/+1 * BROKEN on 5.x: does not compileKris Kennaway2003-10-163-3/+21 * BROKEN on 5.x: does not compileKris Kennaway2003-10-161-1/+7 * remove php category, I was confused with the pear categoryEdwin Groothuis2003-10-161-1/+1 * dbmail tarball has been updated.Erwin Lansing2003-10-1615-50/+50 * * Update to 0.3Joe Marcus Clarke2003-10-1625-19820/+15 * update to 0.9.7Oliver Lehmann2003-10-158-8/+8 * - Fix build on -currentKirill Ponomarev2003-10-151-15/+95 * update to openwebmail 2.20Yen-Ming Lee2003-10-152-5/+5 * - add CONFLICTSDirk Meyer2003-10-1412-0/+12 * VMailMgr (short for Virtual MAIL ManaGeR) is a package of programsAlexander Leidinger2003-10-145-0/+92 * Correct misspelt exim-postgresql conflict.Sheldon Hearn2003-10-141-1/+1 * Upgrade to 0.9.8.Munechika SUMIKAWA2003-10-142-3/+4 * Upgrade to 1.2.Munechika SUMIKAWA2003-10-1420-195/+245 * Depend on ports/www/p5-libwww rather than ports/www/libwww.Trevor Johnson2003-10-141-4/+4 * Add p5-Mail-Procmail, it's module to provide procmail-like tools.Vanilla I. Shu2003-10-135-0/+38 * - add CONFLICTSDirk Meyer2003-10-133-0/+3 * Mark IGNORE on -STABLE Alpha.Joe Marcus Clarke2003-10-135-0/+20 * Use ${CP}, ${RM}, etc.Andrey A. Chernov2003-10-121-3/+3 * - add CONFLICTSDirk Meyer2003-10-124-2/+26 * Fix leftover from pkg-plist copyingAndrey A. Chernov2003-10-121-1/+1 * - use DOCSDIRDirk Meyer2003-10-121-9/+9 * - use DOCSDIR and EXAMPLESDIRDirk Meyer2003-10-123-22/+22 * New port: UebiMiau PHP WebmailEdwin Groothuis2003-10-125-0/+196 * Move socket from /usr/local/var/sentinel to /var/sentinelAndrey A. Chernov2003-10-124-14/+8 * Move socket/DB dir into /var/milter-sender, remember to change /etc/mail/*.mc!Andrey A. Chernov2003-10-125-21/+43 * balsa and balsa2 conflict with each other.Joe Marcus Clarke2003-10-112-0/+4 * Fix EnglishAndrey A. Chernov2003-10-111-1/+1 * Mark bsmtp and smail as mutually conflicting.Christian Weisgerber2003-10-112-0/+4 * Replace ${.CURDIR}/../../ with ${PORTSDIR} which is more correct andErwin Lansing2003-10-102-4/+4 * Update to 1.33Erwin Lansing2003-10-102-2/+2 * - Add CONFLICTS with mail/gmime2Kirill Ponomarev2003-10-101-0/+1 * - Update CONFLICTS with gmime-1.*Kirill Ponomarev2003-10-101-1/+1 * New port: mb2md - Converts mbox mailboxes to MaildirEdwin Groothuis2003-10-105-0/+40 * - Add optional dependency on databases/py-cdb port to make -cdbKirill Ponomarev2003-10-101-0/+4 * - new option SENDMAIL_WITHOUT_SHMEM [1], ports/57781Dirk Meyer2003-10-106-38/+62 * Update to MIMEDefang 2.38.Peter Pentchev2003-10-092-2/+2 * Fix NOPORTDOCSErwin Lansing2003-10-095-5/+5 * Update to vpopmail 5.3.28. Only set vpopmail:vchkpw ownership onPeter Pentchev2003-10-084-12/+6 * Update to sccmilter 0.94.2c.Peter Pentchev2003-10-082-6/+6 * new port: mail/mlsEdwin Groothuis2003-10-086-0/+69 * update to drbl-2.1Yen-Ming Lee2003-10-083-15/+37 * Strip only leading/trailing spaces when reading config valuesAndrey A. Chernov2003-10-083-4/+23 * - Update to version 0.29Kirill Ponomarev2003-10-073-4/+7 * [new port] mail/dbmail: An SQL database-based mail system (POP3 and IMAP)Edwin Groothuis2003-10-0726-0/+781 * Upgrade to 1.60 (includes a couple of bugfixes).Jun Kuriyama2003-10-072-4/+3 * Remove unnecessary USE_PERL5.Trevor Johnson2003-10-071-1/+0 * Update to 0.6 (still untested).Trevor Johnson2003-10-073-34/+2 * - Update to version 1.4.2Kirill Ponomarev2003-10-074-4/+37 * [New Port] mail/py-mimelibEdwin Groothuis2003-10-0613-0/+292 * Update to 0.15.Anton Berezin2003-10-063-10/+9 * - Update to version 0.54.20030928Kirill Ponomarev2003-10-063-18/+3 * New Port: mail/pop-before-smtp - smtp authentication toolEdwin Groothuis2003-10-067-0/+212 * Upgrade to 0.40Andrey A. Chernov2003-10-063-14/+14 * Update to 0.9.6.Alexander Leidinger2003-10-0512-94/+32 * update gkrellmmailwatch to 2.4.2Oliver Lehmann2003-10-053-3/+7 * new port of the milter-regex plugin for sendmailTrevor Johnson2003-10-056-0/+141 * use the patch comes from SpamAssassin FAQ insteadYen-Ming Lee2003-10-042-4/+33 * Mark mail/smunge as broken because it depends on net/openldap12.Edwin Groothuis2003-10-041-0/+2 * Fix -M core dumpAndrey A. Chernov2003-10-041-0/+11 * Upgrade to 0.39Andrey A. Chernov2003-10-043-26/+14 * Upgrade dspam to 2.7.1 (no response from maintainer for 10 days)Oliver Lehmann2003-10-048-24/+112 * - Update to 0.86 "Venetian Way" release:Kirill Ponomarev2003-10-032-2/+2 * - Add 2 new mirros (Germany and Poland)Kirill Ponomarev2003-10-031-0/+2 * - Update to 0.11.0:Kirill Ponomarev2003-10-032-2/+2 * Chase up new MASTER_SITE_SAVANNAH.Edwin Groothuis2003-10-034-4/+8 * Move USE_* above bsd.port.pre.mk.Oliver Lehmann2003-10-034-12/+40 * Update to 1.8Mathieu Arnold2003-10-035-65/+24 * Update to 0.9.4.Peter Pentchev2003-10-022-2/+2 * Update to 2.0.15.Joe Marcus Clarke2003-10-023-14/+5 * - update to 2.60.4Christian Weisgerber2003-10-023-6/+8 * Update to 2.0.16Sergey A. Osokin2003-10-0230-100/+130 * the start/stop scripts failed when booting on 5.x machinesHajimu UMEMOTO2003-10-028-12/+12 * - Update to 1.2.3Kirill Ponomarev2003-10-012-15/+3 * - Update to version 2.2Kirill Ponomarev2003-10-012-2/+2 * Switch to openldap20 instead of openldap12 since the later is aboutMario Sergio Fujikawa Ferreira2003-10-011-0/+3 * Add WITH_SHY_ENABLED knob which prevents qpopper from presentingMario Sergio Fujikawa Ferreira2003-10-011-0/+8 * - Update to version 0.9.3Kirill Ponomarev2003-10-012-2/+2 * Add lmtpd 0.9.7,Vanilla I. Shu2003-10-015-0/+45 * IMP3 port's dependancy test fails for cyrus-imapd22Edwin Groothuis2003-09-301-15/+6 * Manually do the recursive chown of the vpopmail directory that wasPeter Pentchev2003-09-302-0/+4 * New port: mail/spamd - Trapit in cooperation with security/pfEdwin Groothuis2003-09-308-0/+221 * - Update to version 2.1.3Kirill Ponomarev2003-09-304-10/+203 * Add a patch to fix build problems on -CURRENT.Tilman Keskinoz2003-09-301-0/+28 * Don't hard-code the desired OpenLDAP version; this value happens to beSheldon Hearn2003-09-291-1/+0 * - Update to 0.85 "Tomy Lee" releaseKirill Ponomarev2003-09-293-2/+3 * Properly retire mail/exim-ldap.Sheldon Hearn2003-09-291-1/+0 * WARNING: See caution at the end of this bullet list.Sheldon Hearn2003-09-2910-233/+187 * Update to 0.07.Akinori MUSHA2003-09-293-8/+15 * Update to 0.11.Akinori MUSHA2003-09-293-10/+10 * Update to 0.15.Akinori MUSHA2003-09-293-43/+57 * - respect CFLAGSAdam Weinberger2003-09-291-0/+5 * Add qmail-remove 0.93,Oliver Lehmann2003-09-295-0/+44 * Mailmgr is a Sendmail Analisys Report Generator.Kirill Ponomarev2003-09-295-0/+35 * - Update to 3.2.0Kirill Ponomarev2003-09-293-3/+5 * - Update to version 1.0.0Kirill Ponomarev2003-09-284-8/+17 * Enable compilation on 4.9-PRERELEASE.Trevor Johnson2003-09-282-0/+40 * Fix libintl version number.Trevor Johnson2003-09-282-4/+4 * Use the INFO variable.Trevor Johnson2003-09-282-10/+4 * USE_PERL5 for elmoconf.plTrevor Johnson2003-09-282-0/+4 * Update to 0.6.0Tilman Keskinoz2003-09-282-2/+2 * new port of fetchyahoo 2.5.3Trevor Johnson2003-09-284-0/+67 * new port of ELMO, the ELectronic Mail OperatorTrevor Johnson2003-09-289-0/+143 * Add sylpheed-gtk2 0.9.5.20030906,Oliver Lehmann2003-09-277-0/+275 * [PATCH] mail/tmda: update to 0.83, take maintainershipEdwin Groothuis2003-09-273-5/+5 * ECHO -> ECHO_MSG, ECHO_CMDHajimu UMEMOTO2003-09-274-52/+52 * [UPDATE] Security update for ecartis, new snap-20030814Edwin Groothuis2003-09-272-2/+2 * - ECHO -> ECHO_MSGEdwin Groothuis2003-09-275-29/+29 * Add LDFLAGS, re-arrange CFLAGSAndrey A. Chernov2003-09-271-4/+2 * Allow building with sendmail from portsAndrey A. Chernov2003-09-271-3/+9 * fix commentHajimu UMEMOTO2003-09-274-8/+8 * - Chase libraries to new gnutls versionKirill Ponomarev2003-09-261-1/+1 * - Fix bogus kill -SIGUSR1 to -USR1 for reload targetDirk Meyer2003-09-262-2/+3 * Razor2 is not quite taint-safe.Yen-Ming Lee2003-09-264-1/+29 * More package system integration fixesAndrey A. Chernov2003-09-261-2/+10 * - Update to version 0.5.0 [1]Kirill Ponomarev2003-09-262-4/+19 * Don't use pre/post.mkAndrey A. Chernov2003-09-261-4/+1 * Partial backing out of prev. change because bsd.port.mk assumes oldAndrey A. Chernov2003-09-261-0/+2 * - add reload target in rc.scriptDirk Meyer2003-09-261-0/+8 * Remove CONFIGURE_TARGET, use += in CONFIGURE_ARGS insteadAndrey A. Chernov2003-09-261-4/+3 * Better integration into ports systemAndrey A. Chernov2003-09-264-35/+49 * update sylpheed to 0.9.6Oliver Lehmann2003-09-258-8/+8 * - Update to version 0.54.20030915Kirill Ponomarev2003-09-253-114/+126 * update to spamstats-0.4b5Yen-Ming Lee2003-09-252-2/+2 * Upgrade to the 2.60 release. This version has lots of cleanups,Doug Barton2003-09-253-18/+24 * Add my name/e-mailDoug Barton2003-09-251-0/+3 * Mark this port IGNORE in favor of the 2.60 releaseDoug Barton2003-09-251-3/+4 * Update to 1.4.5. SeeJoe Marcus Clarke2003-09-253-104/+106 * - use ${PTHREAD_LIBS} in configureDirk Meyer2003-09-251-1/+4 * - MASTER_SITE movedDirk Meyer2003-09-252-2/+2 * - add check to protect against override of base sendmailDirk Meyer2003-09-254-0/+52 * Utilize ${DOCSDIR} and ${EXAMPLESDIR}.Sergey A. Osokin2003-09-246-794/+794 * o Use DOCSDIR and EXAMPLESDIR.Norikatsu Shigemura2003-09-246-85/+100 * use the USE_MYSQL var instead of manually seting DEPENDS to mysql323 [1]Oliver Lehmann2003-09-243-4/+152 * s/ECHO/ECHO_MSG/g, merge the pre-fetch target into the pre-everything targetOliver Lehmann2003-09-241-8/+7 * Use ${STRIP_CMD} instead of strip.Sergey A. Osokin2003-09-241-1/+1 * Upgrade to 0.38Andrey A. Chernov2003-09-247-144/+85 * Abuse.net change their reply formatAndrey A. Chernov2003-09-242-3/+23 * Add p5-Email-MIME-Encodings 1.0,Erwin Lansing2003-09-245-0/+45 * mail/imp3: removing IS_INTERACTIVE.Edwin Groothuis2003-09-241-4/+3 * mail/turba: upgrading to 1.2.1 & removing IS_INTERACTIVE.Edwin Groothuis2003-09-24