aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-04-01 17:45:29 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-04-01 17:45:29 +0800
commitb860b6769329137c24024c2330529d7b2078d89d (patch)
tree9a810f1b56c91fea455f26b1d3185797d3f91ad2
parent7b7392826d7b76fd4a0bd57baa7ca1224a19a3f6 (diff)
downloaddexon-b860b6769329137c24024c2330529d7b2078d89d.tar.gz
dexon-b860b6769329137c24024c2330529d7b2078d89d.tar.zst
dexon-b860b6769329137c24024c2330529d7b2078d89d.zip
Remove extra type assetion
-rw-r--r--rpc/messages.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/rpc/messages.go b/rpc/messages.go
index 42af53c58..f868c5f9b 100644
--- a/rpc/messages.go
+++ b/rpc/messages.go
@@ -45,29 +45,29 @@ func (d *hexdata) UnmarshalJSON(b []byte) (err error) {
func newHexData(input interface{}) *hexdata {
d := new(hexdata)
- switch input.(type) {
+ switch input := input.(type) {
case []byte:
- d.data = input.([]byte)
+ d.data = input
case common.Hash:
- d.data = input.(common.Hash).Bytes()
+ d.data = input.Bytes()
case *common.Hash:
- d.data = input.(*common.Hash).Bytes()
+ d.data = input.Bytes()
case common.Address:
- d.data = input.(common.Address).Bytes()
+ d.data = input.Bytes()
case *common.Address:
- d.data = input.(*common.Address).Bytes()
+ d.data = input.Bytes()
case *big.Int:
- d.data = input.(*big.Int).Bytes()
+ d.data = input.Bytes()
case int64:
- d.data = big.NewInt(input.(int64)).Bytes()
+ d.data = big.NewInt(input).Bytes()
case uint64:
- d.data = big.NewInt(int64(input.(uint64))).Bytes()
+ d.data = big.NewInt(int64(input)).Bytes()
case int:
- d.data = big.NewInt(int64(input.(int))).Bytes()
+ d.data = big.NewInt(int64(input)).Bytes()
case uint:
- d.data = big.NewInt(int64(input.(uint))).Bytes()
+ d.data = big.NewInt(int64(input)).Bytes()
case string: // hexstring
- d.data = common.Big(input.(string)).Bytes()
+ d.data = common.Big(input).Bytes()
default:
d.data = nil
}
31-1/+1 * - Add NO_ARCHamdmi32017-01-131-1/+2 * - Always check OPSYS along with OSVERSIONamdmi32017-01-121-1/+1 * devel/boost-*: update to 1.63.0jbeich2017-01-061-1/+1 * chrase irc/irssi.vanilla2017-01-061-3/+2 * Reassign to the perl collectiveadamw2017-01-031-1/+1 * leeym handed in his commit bit.rene2017-01-032-2/+2 * Update to 5.2.4.jkim2017-01-022-10/+10 * Remove BROKEN_FreeBSD_9sunpoet2017-01-011-2/+0 * - Remove bogus (in presence of USE_GITHUB) USES=tar*amdmi32016-12-291-4/+4 * - Unbreak by change MASTER_SITES to githubwen2016-12-292-11/+8 * chinese/fcitx: Enable GTK3 by default, fcitx doesn't work in firefox without itpi2016-12-281-2/+2 * chinese/pyzy: unbreak by moving upstream to githubpi2016-12-275-31/+57 * - Update to 4.7sunpoet2016-12-212-4/+4 * Revert r428752 and unbreakantoine2016-12-181-2/+4 * - Use USES=makeinfo instead of hard-coded BUILD_DEPENDSsunpoet2016-12-171-4/+2 * - Add php-opencc 0.0.0.20161110sunpoet2016-12-174-0/+33 * - Remove MASTER_SITESsunpoet2016-12-171-1/+0 * - Update to 4.7amdmi32016-12-142-4/+4 * Unbreak fetching by pointing to archived distfile in Google Cloud Storage.kevlo2016-12-131-4/+1 * Remove libintl.so.9 compatibility link that was added in r374303 totijl2016-12-093-2/+3 * Remove libiconv.so.3 compatibility link that was added in r374303 totijl2016-12-093-1/+3 * http://github.com redirects to https://github.com, spare everyone a redirect.mat2016-12-021-1/+1 * Fix building with mutt-1.7.2.vanilla2016-12-0210-495/+426 * Don't quote {} in find -exec calls.mat2016-12-013-3/+3 * devel/boost-*: update to 1.62.0jbeich2016-11-231-0/+1 * Mention fcitx.kevlo2016-11-232-0/+30 * devel/eric6: update to 6.1.11dbn2016-11-191-3/+3 * Importing KDE Frameworks into the ports tree (required for newer KDE Desktop ...tcberner2016-11-151-3/+3 * Update libreoffice to 5.2.3 and liborcus to 0.11.2bapt2016-11-122-8/+10 * Track used or drop unused devel/icu dependencyjbeich2016-11-111-2/+1 * chinese/tin: drop PORTREVISION as it has no effectjbeich2016-11-111-2/+0 * fandol - Four basic fonts for Chinese typesettingdelphij2016-11-076-0/+89 * Fix man pages generation with Perl 5.24+mat2016-11-036-19/+30 * Fix github usage.mat2016-11-031-3/+2 * Cleanup no longer needed CHMOD usage after r424898.mat2016-11-031-0/+3 * Use USES=pathfix where applicable.mat2016-10-213-14/+2 * ${RM} already has -f.mat2016-10-213-3/+3 * devel/eric6: update to 6.1.10.dbn2016-10-101-3/+3 * Catch stray dependencies, courtesy of the proxy-deps qa check.mat2016-10-012-6/+7 * - Update devel/icu to 57.1.tijl2016-09-242-1/+2 * Unmark broken on powerpc64swills2016-09-152-4/+0 * Revert recent strfile changes, strfile is already in baseantoine2016-09-151-2/+8 * Update to version 4.6.1pawel2016-09-152-4/+4 * GOOGLE_CODE has gone away.mat2016-09-1412-1/+23 * chinese/fortune: Use fortune_strfile instead of strfile(8) and mark BROKENmarino2016-09-141-8/+4 * devel/eric6: update to 6.1.9dbn2016-09-061-3/+3 * Replace Mk/bsd.kde4.mk by Mk/Uses/kde.mk in preparation for KDE Frameworks andtcberner2016-08-241-1/+2 * devel/eric6: update to 6.1.8.dbn2016-08-201-3/+3 * - Update to version 4.6pawel2016-08-202-4/+5 * - Take maintainership [1]pawel2016-08-151-2/+2 * - Pass maintainership to submitterwen2016-08-101-1/+1 * USE_BDB cleanup.mat2016-08-083-6/+3 * Don't use extension.ini any more, and have each extension install in itsmat2016-08-031-0/+1 * Remove spurious ${STAGEDIR} from @exec and @unexec lines added to the plistse2016-07-298-9/+9 * chinese/ttfm: don't touch user font cache on installjbeich2016-07-267-9/+9 * Reset miwi@'s ports, he stepped down from the Ports Team.rene2016-07-262-2/+2 * When there is a do-install target, do not use a post-install target, domat2016-07-192-2/+1 * chinese/phpbb-tw: fix hostname in pkg-message for reproducible buildsemaste2016-07-191-1/+1 * Update to version 1.5.1pawel2016-07-134-15/+32 * chinese/fcitx: 4.2.8.6 -> 4.2.9.1pi2016-07-099-41/+48 * chinese/librime: 1.1 -> 1.2.9pi2016-07-094-66/+19 * chinese/opencc: 0.4.3 -> 1.0.4pi2016-07-097-147/+75 * Update to 11.5vanilla2016-07-072-4/+5 * Bump PORTREVISION for the icu revert.mat2016-07-072-2/+2 * devel/icu: bump PORTREVISION on missing dependent portsgahr2016-07-061-1/+1 * devel/icu: bump PORTREVISION on dependent portsgahr2016-07-061-1/+1 * eric6 ports: Update to version 6.1.7.bsam2016-07-051-3/+3 * chinese/wordpress-zh_CN: update 4.5.2 -> 4.5.3junovitch2016-07-042-4/+4 * Convert USE_PHP*=yes into USES=php*mat2016-06-281-2/+1 * eric6 ports: Update to version 6.1.6.bsam2016-06-061-2/+3 * Github cleanup.mat2016-06-012-3/+4 * Many KDE i10n ports: Patch updates CURDIRpi2016-05-263-3/+3 * Remove useless WRKSRC definitions.mat2016-05-252-2/+0 * editors/calligra-l10n: add plist-subpi2016-05-243-109/+109 * Remove NLS, DOCS, EXAMPLES and IPV6 from OPTIONS_DEFAULT, they are enabled by...amdmi32016-05-242-2/+1 * Convert tab after WWW: in pkg-descrs to single space as per PHBamdmi32016-05-241-1/+1 * chinese/wordpress-zh_CN: update 4.4.2 -> 4.5.2junovitch2016-05-202-3/+4 * - Fix trailing whitespace in pkg-messagesamdmi32016-05-196-9/+9 * - Fix trailing whitespace in pkg-descrs, categories [a-f]*amdmi32016-05-198-14/+14 * eric6 ports: Update to version 6.1.5.bsam2016-05-101-2/+2 * chinese/wordpress-zh_TW: update 4.4.2 -> 4.5.2junovitch2016-05-102-3/+3 * - Fix runtime error caused by wrong CHEWING_DATADIRlwhsu2016-05-102-1/+11 * - Mark BROKEN on 9.xamdmi32016-05-091-0/+2 * Update to 0.5.0.vanilla2016-05-095-34/+17 * During the exp-run in bug 208158, it was found that chinese/sunpinyindim2016-05-082-0/+18 * Update to 5.0.6.jkim2016-05-072-8/+8 * - Update to 1.15sunpoet2016-05-024-51/+4 * Remove USE_SQLITE from bsd.databases.mk, replaced by USES=sqlite.mat2016-04-261-2/+1 * many ports: mark broken on powerpc64swills2016-04-222-0/+4 * eric6 ports: update to version 6.1.4 (reaaly, previous updatebsam2016-04-221-2/+2 * eric6 ports: update to version 6.1.4.bsam2016-04-221-2/+2 * Remove ${PORTSDIR}/ from dependencies, Mk and categories a, b, and c.mat2016-04-0156-114/+114 * Add missing items to the calligra-l10n ports plists.rakuco2016-03-294-0/+4 * Make print/ghostscript9-agpl-base the default Ghostscript port. Upstreamtijl2016-03-241-0/+1 * These ports do not build with PHP 7.0, make them as such.mat2016-03-141-0/+1 * Always set the DEFAULT github DISTFILE with .tar.gz for EXTRACT_SUFX.mat2016-03-081-2/+2 * - Update WWWsunpoet2016-03-071-1/+1 * - Update to 0.6.3sunpoet2016-03-064-12/+17 * Update to 1.3.rakuco2016-02-284-17/+5 * - Update to 4.4.2miwi2016-02-234-6/+6 * Regenerate a few patches to unbreak after the news/tin update in r406242.rakuco2016-02-223-9/+7 * - Update devel/yaml-cpp to 0.5.3madpilot2016-02-221-0/+1 * Update to 5.0.5.jkim2016-02-162-8/+8 * Update Calligra ports in chinese/ that should have been part of r408504.rakuco2016-02-094-6/+4 * eric6 ports: Update to version 6.1.2.bsam2016-02-082-3/+3 * chinese/cless: USES+= ncurses, link to libncurses, not libtermcapmarino2016-02-051-0/+4 * chinese/celvis: USES+= ncurses, respect LDFLAGSmarino2016-02-051-0/+2 * chinese/qe: document ncurses requirement (USES+=ncurses)marino2016-02-021-1/+1 * chinese/ve: document ncurses requirement (USES+=ncurses), respect LDFLAGSmarino2016-02-021-1/+2 * Mark BROKEN: fails to patchantoine2016-01-211-0/+2 * Upgrade to 0.35.vanilla2016-01-183-5/+5 * Convert LICENSE= "GPLxx # or later" to "GPLxx+"amdmi32016-01-135-5/+5 * - Update to 4.4.1miwi2016-01-122-3/+3 * - Update to 4.4.1miwi2016-01-082-3/+3 * Add USES=pathfix support for CMake. Some ports that use CMake to buildjhale2016-01-072-14/+5 * - Switch to USE_SQLITEjhale2016-01-071-2/+2 * eric6 ports: Update to version 6.1.1.bsam2016-01-051-2/+2 * A command line tool to do EN <-> CH translation, utilized by Yahoo! Dictionary.miwi2016-01-04