next() just complains that there is no next item in the iterator. Does this mean the I/O failed? According to the docs, the BlockFileLoader swallows I/O exceptions, so I can't see the I/O error.
On 21 February 2017 at 10:31, Jameson Lopp <[email protected]> wrote: > You should definitely be able to build your own List<File> list that you > pass to the loader - I've done this myself in the past. > > What error are you seeing? > > On Mon, Feb 20, 2017 at 4:20 PM, Nishil Shah <[email protected]> > wrote: > >> I would use that List to initialize the block file loader. >> >> On 20 February 2017 at 15:19, Nishil Shah <[email protected]> >> wrote: >> >>> I see, thanks. One last question: So shouldn't I be able to simply build >>> a List<File> and append paths to my block files "/path/to/blk00000.dat"? I >>> tried this and when I do blockFileLoader.next() I get an error. Don't think >>> this works. >>> >>> On 19 February 2017 at 03:25, Jameson Lopp <[email protected]> >>> wrote: >>> >>>> Right, getReferenceClientList >>>> <https://github.com/bitcoinj/bitcoinj/blob/3177bd52a2bfa491c5902e95b8840030e1a31159/core/src/main/java/org/bitcoinj/utils/BlockFileLoader.java#L53> >>>> just tries to be smart and figure out the location of your block files >>>> automatically. If it doesn't work for your system, you can model its logic >>>> to create your own function that builds a list of your block files. >>>> >>>> For your purposes, I'm assuming you're analyzing Bitcoin on mainnet, so >>>> you'd pass MainNetParams.get(). The only other thing for you to figure out >>>> then would be your data storage, which would be your "chain" object or >>>> whatever function to which you pass the blocks to be processed. >>>> >>>> - Jameson >>>> >>>> On Sun, Feb 19, 2017 at 2:00 AM, Nishil Shah <[email protected]> >>>> wrote: >>>> >>>>> It doesn't take in a file name? >>>>> >>>>> Sent from my iPhone >>>>> >>>>> On Feb 19, 2017, at 12:33 AM, Jameson Lopp <[email protected]> >>>>> wrote: >>>>> >>>>> I think what you want is the BlockFileLoader, as seen here in the >>>>> BlockImporter: https://github.com/bitcoinj/bitcoinj/blob/mas >>>>> ter/tools/src/main/java/org/bitcoinj/tools/BlockImporter.java#L67 >>>>> >>>>> - Jameson >>>>> >>>>> On Sat, Feb 18, 2017 at 11:51 PM, Nishil Shah <[email protected] >>>>> > wrote: >>>>> >>>>>> Is there anyway to import blk?????.dat files individually and parse >>>>>> them into Block objects? I'm not trying to use any network connections. I >>>>>> want to get everything from disk if possible to make my >>>>>> computations/processing as fast as possible because I want parse many >>>>>> files >>>>>> in parallel. I've read about some "block importer" tool but can't really >>>>>> see how to use it in my situation. Thanks. >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "bitcoinj" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected]. >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> -- >>>>> You received this message because you are subscribed to a topic in the >>>>> Google Groups "bitcoinj" group. >>>>> To unsubscribe from this topic, visit https://groups.google.com/d/to >>>>> pic/bitcoinj/4wB6-i7ys8E/unsubscribe. >>>>> To unsubscribe from this group and all its topics, send an email to >>>>> [email protected]. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "bitcoinj" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected]. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> -- >>>> You received this message because you are subscribed to a topic in the >>>> Google Groups "bitcoinj" group. >>>> To unsubscribe from this topic, visit https://groups.google.com/d/to >>>> pic/bitcoinj/4wB6-i7ys8E/unsubscribe. >>>> To unsubscribe from this group and all its topics, send an email to >>>> [email protected]. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "bitcoinj" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to a topic in the > Google Groups "bitcoinj" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/bitcoinj/4wB6-i7ys8E/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "bitcoinj" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
