aboutsummaryrefslogtreecommitdiffstats
path: root/swarm
diff options
context:
space:
mode:
Diffstat (limited to 'swarm')
-rw-r--r--swarm/storage/dbstore.go2
-rw-r--r--swarm/storage/types.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/swarm/storage/dbstore.go b/swarm/storage/dbstore.go
index 5ecc5c500..4ddebb021 100644
--- a/swarm/storage/dbstore.go
+++ b/swarm/storage/dbstore.go
@@ -354,7 +354,7 @@ func (s *DbStore) Get(key Key) (chunk *Chunk, err error) {
hasher := s.hashfunc()
hasher.Write(data)
hash := hasher.Sum(nil)
- if bytes.Compare(hash, key) != 0 {
+ if !bytes.Equal(hash, key) {
s.db.Delete(getDataKey(index.Idx))
err = fmt.Errorf("invalid chunk. hash=%x, key=%v", hash, key[:])
return
diff --git a/swarm/storage/types.go b/swarm/storage/types.go
index 0dcbc0100..c36522012 100644
--- a/swarm/storage/types.go
+++ b/swarm/storage/types.go
@@ -41,7 +41,7 @@ func (x Key) Size() uint {
}
func (x Key) isEqual(y Key) bool {
- return bytes.Compare(x, y) == 0
+ return bytes.Equal(x, y)
}
func (h Key) bits(i, j uint) uint {
d>amdmi32013-09-184-1/+33 * Fix build on currentamdmi32013-09-182-1/+2 * Fix build with clang/libc++amdmi32013-09-181-0/+25 * Fix build with clang/libc++amdmi32013-09-177-6/+85 * Fix build with clang/libc++amdmi32013-09-171-1/+1 * Fix build with clang/libc++amdmi32013-09-174-0/+85 * Convert to new perl frameworkbapt2013-09-1710-19/+20 * - Fix build with clangmadpilot2013-09-171-1/+8 * - Add explicit LDFLAGSmadpilot2013-09-171-0/+1 * Add -fields package name.bapt2013-09-161-7/+3 * Fix build with libc++rene2013-09-151-0/+10 * Capi City is a client for the online server monopd.nemysis2013-09-155-0/+179 * - Disable for PACKAGE_BUILDINGbdrewery2013-09-151-0/+1 * - Update to 0.4.1nemysis2013-09-144-51/+48 * Fix build with clang/libc++amdmi32013-09-142-0/+33 * Fix build with clang/libc++amdmi32013-09-142-0/+11 * Add explicit dependency on libX11amdmi32013-09-143-0/+3 * Fix build with clang/libc++amdmi32013-09-141-2/+2 * Fix build with clang/libc++amdmi32013-09-142-0/+14 * Fix build with clang/libc++amdmi32013-09-141-0/+20 * Fix build with clang/libc++amdmi32013-09-142-0/+47 * Fix build with clang/libc++amdmi32013-09-141-0/+11 * Fix build with clang/libc++amdmi32013-09-141-0/+5 * Fix build with clang/libc++amdmi32013-09-141-0/+10 * Fix build with clang/libc++amdmi32013-09-145-0/+51 * Fix build with clang/libc++amdmi32013-09-142-0/+22 * Fix build with clang/libc++amdmi32013-09-141-0/+2 * Fix build with clang/libc++amdmi32013-09-141-1/+4 * Fix build with clang/libc++amdmi32013-09-141-0/+11 * Fix build with clang/libc++amdmi32013-09-141-3/+8 * Fix build with clang/libc++amdmi32013-09-142-0/+18 * Fix build with clang/libc++amdmi32013-09-141-0/+10 * Fix build with clang/libc++amdmi32013-09-141-0/+10 * Fix build with clang/libc++amdmi32013-09-141-0/+10 * Fix build with clang/libc++amdmi32013-09-142-0/+22 * Fix build with clang/libc++amdmi32013-09-141-0/+2 * Fix build with clang/libc++amdmi32013-09-141-1/+2 * Unbreak by using new MASTER_SITEflo2013-09-144-20/+10 * Include time.h to fix build with libc++.tijl2013-09-141-0/+10 * Fix build with clang/libc++amdmi32013-09-141-0/+10 * Fix build with clang/libc++amdmi32013-09-142-3/+14 * Fix build with clang/libc++amdmi32013-09-141-0/+10 * Fix build with clang/libc++amdmi32013-09-141-3/+11 * - Fix build after iconv change [1]madpilot2013-09-1411-7/+99 * Fix build on headbapt2013-09-131-0/+1 * Fix build with clang/libc++amdmi32013-09-131-0/+11 * Add explicit dependency on pkgconf (10 ports)marino2013-09-131-1/+1 * - Update to 1.10nemysis2013-09-132-14/+10 * - Update to 1.1.1.5nemysis2013-09-133-20/+29 * - Remove file forgotten in last commitnemysis2013-09-131-23/+0 * - Update to 0.12.2nemysis2013-09-133-26/+30 * - convert to the new perl5 frameworkaz2013-09-133-6/+3 * Add a couple of missing #include <stdlib.h>'s to please contemporary Clang.danfe2013-09-122-0/+20 * - Stop checking for unzip (it's unused anyways) to unbreak on 8.3-RELEASEdanfe2013-09-122-1/+84 * - Install q3map2.6 manual pagedanfe2013-09-123-12/+21 * - Unbreak the build in GCC-less environments: respect CC, pacify Clangdanfe2013-09-122-1/+17 * - Unbreak the build in GCC-less environment by explicitly passing LD valuedanfe2013-09-121-4/+3 * Add explicit dependency on pkgconf (20 ports)marino2013-09-122-8/+3 * - Mark as DEPRECATEDamdmi32013-09-121-0/+3 * - Fix build with clangamdmi32013-09-123-1/+26 * - Mark as DEPRECATEDamdmi32013-09-121-0/+3 * Add explicit dependency on pkgconf (11 ports)marino2013-09-123-14/+5 * - Fix build with clangamdmi32013-09-121-0/+1 * Add explicit dependency on pkgconf (27 ports)marino2013-09-122-5/+3 * - Fix build with clangamdmi32013-09-122-1/+28 * Add explicit dependency on pkgconf (8 ports)marino2013-09-122-7/+3 * Add an explicit dependency on pkgconfantoine2013-09-121-7/+2 * Add explicit dependency on pkgconf (18 ports)marino2013-09-123-12/+8 * Add explicit dependency on pkgconf (6 ports)marino2013-09-111-1/+1 * - convert to the new perl5 frameworkaz2013-09-118-38/+17 * - add upstream patch to fix build on -CURRENTrm2013-09-111-0/+20 * Bump some PORTREVISIONs due to graphics/webp update to 0.3.1mm2013-09-101-0/+1 * - Revert r325962 and set MODELS as default optionbar2013-09-103-61/+36 * Add an explicit dependency on pkgconfantoine2013-09-104-15/+7 * Update mirrors in MASTER_SITES.rakuco2013-09-071-2/+2 * - Fix build with clangamdmi32013-09-071-0/+20 * - Fix build on 10.xamdmi32013-09-071-0/+1 * - Trim Makefile header down to two linesdanfe2013-09-072-15/+10 * - Move NO_PACKAGE higher, where it's usually expected to be founddanfe2013-09-071-5/+6 * Add an explicit dependency on pkgconfbapt2013-09-062-3/+2 * - Reduce some minor differences with `games/netradiant'; mention the latterdanfe2013-09-062-7/+14 * Add an explicit dependency on pkgconfbapt2013-09-061-1/+1 * Add a port of NetRadiant, a fork of the well-known GtkRadiant 1.5 FPS gamesdanfe2013-09-068-0/+369 * Add an explicit dependency on pkgconfbapt2013-09-064-5/+4 * Change bogus optimization option -O6 to a more sane -O3 to unbreak the builddanfe2013-09-061-2/+2 * Add an explicit dependency on pkgconfbapt2013-09-061-2/+1 * - Unbreak linking with our new ld(1) by explicitly listing -lgobject-2.0 ondanfe2013-09-062-8/+16 * - Attempt to unbreak the build against Clangdanfe2013-09-062-7/+21 * - Fix build on head after iconv and new ld behavior changesmadpilot2013-09-053-11/+32 * Fix previous commit: close conditional.madpilot2013-09-051-0/+1 * - Update to 0.0.14 (Alpha 14 "Naukratis")madpilot2013-09-054-30/+30 * - Unbreak the build against Clangdanfe2013-09-051-7/+13 * - Add explicit dependency on pkgconfigmadpilot2013-09-051-2/+2 * - Fix the build against Clangdanfe2013-09-051-7/+11 * - Fix the build against Clangdanfe2013-09-053-9/+59 * - Unbreak the build against Clang (non-void function should return a value)danfe2013-09-052-1/+33 * - shift build_depends to test_dependsjgh2013-09-051-1/+1 * Introduce ICONV_CONFIGURE_ARG variable defined at Uses/iconv.mk.bsam2013-09-052-3/+3 * - Make ports use the libc provided iconv implementation on 10-CURRENTmadpilot2013-09-055-5/+6 * - update to 0.043jgh2013-09-042-4/+9 * Fix PORT_OPTIONS conversionantoine2013-09-041-1/+1 * Add an explicit dependency on pkgconfantoine2013-09-041-1/+1 * Add an explicit dependency on pkgconfbapt2013-09-032-3/+2 * Fix typobapt2013-09-031-1/+1 * Add an explicit dependency on pkgconfbapt2013-09-0313-51/+20 * Add an explicit dependency on pkgconfbapt2013-09-031-2/+1 * Add an explicit dependency on pkgconfbapt2013-09-031-2/+1 * Add an explicit dependency on pkgconfbapt2013-09-0312-42/+19 * Add an explicit dependency on pkgconfbapt2013-09-031-0/+1 * Fix stupid mistakebapt2013-09-031-2/+1 * Add an explicit dependency on pkgconfbapt2013-09-032-6/+3 * Add an explicit dependency on pkgconfbapt2013-09-032-1/+2 * Add an explicit dependency on pkgconfbapt2013-09-031-0/+1 * Add an explicit dependency on pkgconfbapt2013-09-031-1/+1 * Add an explicit dependency on pkgconfbapt2013-09-032-7/+3 * Add an explicit dependency on pkgconfbapt2013-09-035-23/+8 * Add an explicit dependency on pkgconfbapt2013-09-033-3/+4 * Add an explicit dependency on pkgconfbapt2013-09-032-7/+3 * Add an explicit dependency on pkgconfbapt2013-09-031-1/+1 * Add an explicit dependency on pkgconfbapt2013-09-037-3/+7 * Add an explicit dependency on pkgconfbapt2013-09-031-1/+1 * Add an explicit dependency on pkgconfbapt2013-09-032-2/+2 * Add an explicit dependency on pkgconfbapt2013-09-031-0/+1 * Add an explicit dependency on pkgconfbapt2013-09-031-5/+2 * Add an explicit dependency on pkgconfbapt2013-09-022-6/+3 * Add an explicit dependency on pkgconfbapt2013-09-021-5/+2 * Two imake related changes:tijl2013-09-021-2/+1 * Add an explicit dependency on pkgconfigbapt2013-09-021-5/+2 * Add an explicit dependency on pkgconfigbapt2013-09-021-1/+1 * Add explicit dependencies on pkgconfbapt2013-09-027-12/+9 * Add an explicit dependency on pkgconfigbapt2013-09-021-7/+2 * Add an explicit dependency on pkgconfigbapt2013-09-021-2/+1 * - Convert old-school USE_GMAKE and USE_PERL5_* to modern USESdanfe2013-09-021-2/+2 * Add an expicit dependency on pkgconfbapt2013-09-021-1/+1 * Eradiracte USE_GNOME=pkgconfig from gamesbapt2013-09-022-5/+3 * - update to 2.3.7rm2013-09-011-2/+2 * Remove expired ports:rene2013-09-017-94/+0 * - Update to 0.1.4madpilot2013-09-015-115/+140 * games/iourbanterror: Fix new patchesmarino2013-09-012-49/+42 * games/ioquake3 and slaves: Fix optionsmarino2013-08-3124-236/+275 * games/openarena-data: Fix relative include pathmarino2013-08-311-1/+1 * - do not use local bsd.python.mk variables within the port Makefile - switchmva2013-08-311-1/+1 * Unbreak fetching (hopefully for longer time).danfe2013-08-301-3/+1 * - Explicitely specify portaudio2 so version, for it to not be confised with o...amdmi32013-08-301-1/+1 * - Mark BROKEN, fails to fetch.bdrewery2013-08-301-5/+3 * - Remove Author linesunpoet2013-08-301-1/+0 * - Try to unbreak parallel builds (-jX): their makefile has a rule withdanfe2013-08-292-6/+21 * - Use single space after WWW:sunpoet2013-08-291-1/+1 * - Disconnect ports removed in r325546bdrewery2013-08-291-1/+0 * - Fix buildamdmi32013-08-291-1/+2 * - Fix buildamdmi32013-08-294-8/+19 * - Fix build breakage introduced in r324073amdmi32013-08-293-7/+28 * Update to latest GNUstep core libraries.theraven2013-08-294-77/+0 * - Fix build with clangamdmi32013-08-283-6/+28 * - Fix build on 10.Xamdmi32013-08-281-0/+1 * - Fix build with clangamdmi32013-08-283-78/+15 * Remove bmake workaround now that bmake has been fixedbapt2013-08-281-4/+0 * - Fix build on 10.X (pipe2 symbol conflicts with pipe2() from unistd.h)amdmi32013-08-281-0/+2 * Correct maintainer, who is now a committer!deischen2013-08-281-1/+1 * Change maintainer to nemysis from ports@. Update Makefile for PORTDOCS,deischen2013-08-282-37/+32 * - Update to 1.4amdmi32013-08-275-34/+64 * Update maintainer's email addresseadler2013-08-272-2/+2 * games/xbl: Update MASTER_SITE and WWW fieldmarino2013-08-262-8/+4 * - Update to 0.91amdmi32013-08-246-18/+53 * - Update to 0.0.5amdmi32013-08-233-5/+11 * - Fix build on -CURRENTamdmi32013-08-231-0/+1 * - Fix build with clangamdmi32013-08-221-0/+20 * - Cleanup Makefile headersunpoet2013-08-221-5/+1 * - Convert to new perl frameworksunpoet2013-08-211-1/+2 * TomeNET is an online multiplayer rogue-like role-playing game,culot2013-08-217-0/+260 * - Bump portrevisionnemysis2013-08-204-45/+65 * - shift master_sites around, and use project as primaryjgh2013-08-191-6/+10 * games/freetennis: Adjust dependenciesmarino2013-08-181-2/+2 * - Update to 1.2.2nemysis2013-08-183-79/+71 * - take maintainershipjgh2013-08-181-2/+2 * Replace USE_GCC=4.6+ and USE_GCC=4.4+ by USE_GCC=yes.gerald2013-08-18