diff --git a/blockchain/Multi.go b/blockchain/Multi.go index 75f3ec0..778c23c 100644 --- a/blockchain/Multi.go +++ b/blockchain/Multi.go @@ -274,12 +274,9 @@ func (multi *MultiStore) IngestBlock(header *MultiBlockchainHeader, blockNumber // decode it decoded, status, err := DecodeBlockRaw(raw) if failIfInvalid && err != nil { - fmt.Println("---- block invalid -----") return nil, err } - fmt.Println("updated") - // store the transferred block in the cache err = multi.WriteBlock(header.PublicKey, header.Version, blockNumber, raw) if err != nil { @@ -293,13 +290,6 @@ func (multi *MultiStore) IngestBlock(header *MultiBlockchainHeader, blockNumber multi.UpdateBlockchainStatistics(header, decoded.RecordsDecoded) } - for _, recordRaw := range decoded.RecordsRaw { - if recordRaw.Type == 0 { - fmt.Println("Profile update detected") - } - } - fmt.Println("---------") - // update the blockchain header multi.WriteBlockchainHeader(header) diff --git a/webapi/File.go b/webapi/File.go index f50b86f..7d8201a 100644 --- a/webapi/File.go +++ b/webapi/File.go @@ -74,6 +74,10 @@ func blockRecordFileToAPI(input blockchain.BlockRecordFile) (output apiFile) { case blockchain.TagSharedByCount: output.Metadata = append(output.Metadata, apiFileMetadata{Type: tag.Type, Name: "Shared By Count", Number: tag.Number()}) + // if a file has 0 peers sharing then do not add it to the list. + if tag.Number() == 0 { + return apiFile{} + } case blockchain.TagSharedByGeoIP: output.Metadata = append(output.Metadata, apiFileMetadata{Type: tag.Type, Name: "Shared By GeoIP", Text: tag.Text()})