good can already solve conpilar and install in my place with the merge pull 
1738, but still consumes a lot of memory memory "PS Old Gen"



El jueves, 25 de abril de 2019, 17:35:04 (UTC-4), Andreas Schildbach 
escribió:
>
> That sounds like BouncyCastle is not on your classpath. Note that with 
> 0.15 we switched from SpongyCastle back to BouncyCastle. 
>
>
> On 25/04/2019 05.58, Juan Ibarra wrote: 
> > Hello, well i compile the code whit merge te pull 1738 to master install 
> > the library in my local but when run the code show this: 
> > 
> > Caused by: java.lang.NoClassDefFoundError: 
> > org/bouncycastle/crypto/ec/CustomNamedCurves 
> > 
> > 
> > El jueves, 28 de marzo de 2019, 11:14:49 (UTC-4), Andreas Schildbach 
> > escribió: 
> > 
> >     Could you try the patch from 
> >     https://github.com/bitcoinj/bitcoinj/pull/1738 
> >     <https://github.com/bitcoinj/bitcoinj/pull/1738> ? You'd need to 
> >     apply it 
> >     on the version of bitcoinj you're using and then try your profiling 
> >     again. 
> > 
> >     Speaking of profiling: a memory profiler should show which instances 
> >     are 
> >     using up all the memory. Can you check that and post the results? 
> > 
> > 
> >     On 26/03/2019 01.27, Juan Ibarra wrote: 
> >     > Hello, in the backend of my application I need to synchronize 
> every 5 
> >     > minutes Private keys to verify the balance, all right, but for a 
> long 
> >     > time this generates a large consumption of Java memory "PS Old 
> >     Gen", I 
> >     > try and debug 
> >     > always come to the same, now I have separate services one to serve 
> >     API 
> >     > and another Worker for synchronization, 
> >     > the the synchronization I must restart it every so often to dump 
> the 
> >     > consumption of memory, but it is not the 
> >     > ideal solution because the owner needs a monolithic application, 
> >     > together with the code of pueba to verify and 
> >     > capture the use of memory (prometeus + grafana) 
> >     > 
> >     > @Service 
> >     > public class WalletManager { 
> >     > 
> >     >     final private NetworkParameters netParams = 
> TestNet3Params.get(); 
> >     > 
> >     > public void SyncBasicWallets(List<String> wifs) throws Exception { 
> >     >         File chainFileSeed = new File("master-seed.spvchain"); 
> >     > File chainFile = new File(System.currentTimeMillis() + 
> ".spvchain"); 
> >     > byte[] allBytes = Files.readAllBytes(chainFileSeed.toPath()); 
> >     > Files.write(chainFile.toPath(), allBytes); 
> >     > 
> >     > Calendar calendar = Calendar.getInstance(); 
> >     > calendar.add(Calendar.HOUR, -7 * 24); 
> >     > Date time = calendar.getTime(); 
> >     > 
> >     > BlockStore blockStore = new SPVBlockStore(netParams, chainFile); 
> >     > BlockChain chain = new BlockChain(netParams, blockStore); 
> >     > final PeerGroup peerGroup = new PeerGroup(netParams, chain); 
> >     > 
> >     > Map<String, Wallet> wallets = new HashMap<>(); 
> >     > for (String wif : wifs) { 
> >     >             ECKey ecKey = DumpedPrivateKey.fromBase58(netParams, 
> >     wif).getKey(); 
> >     > ecKey.setCreationTimeSeconds(time.getTime() / 1000); 
> >     > Wallet wallet = Wallet.createBasic(netParams); 
> >     > wallet.importKey(ecKey); 
> >     > 
> >     > peerGroup.addWallet(wallet); 
> >     > chain.addWallet(wallet); 
> >     > wallets.put(wif, wallet); 
> >     > } 
> >     > 
> >     > 
> >     >         peerGroup.addPeerDiscovery(new DnsDiscovery(netParams)); 
> >     > peerGroup.start(); 
> >     > peerGroup.downloadBlockChain(); 
> >     > 
> >     > for (String wif : wifs) { 
> >     >             Wallet wallet = wallets.get(wif); 
> >     > 
> >     > // TODO: save wallet file in database 
> >     > 
> >     > peerGroup.removeWallet(wallet); 
> >     > chain.removeWallet(wallet); 
> >     > 
> >     > wallet.cleanup(); 
> >     > wallet.reset(); 
> >     > } 
> >     > 
> >     >         blockStore.close(); 
> >     > peerGroup.stop(); 
> >     > 
> >     > chainFile.delete(); 
> >     > wallets.clear(); 
> >     > } 
> >     > } 
> >     > 
> >     > 
> >     > -- 
> >     > 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 bitc...@googlegroups.com 
> >     > <mailto:bitc...@googlegroups.com>. 
> >     > For more options, visit https://groups.google.com/d/optout 
> >     <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 bitc...@googlegroups.com <javascript:> 
> > <mailto:bitc...@googlegroups.com <javascript:>>. 
> > 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 bitcoinj+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to