I think I figured out what the problem is. I just have to wait more than what I expected. Since I'm setting short locktimes in order to test my smart contracts, and the block creation in the blockchain is around 10 minutes (much less than the locktimes that I was setting). Then, I have to wait until the next block is created to be able to include the transaction (although the locktime has already passed). Well, at least that is my guess. Kind regards.
On Thursday, November 30, 2017 at 2:20:23 PM UTC+1, vg-coder wrote: > > > Dear all, > > I am creating a Tx with locktime 2 minutes from the current moment and > sequence number = 0: > > fba9b3ec578c3be4bf159eb3d22f6503452689fc80d96d9488ebeaabf3a9cdbd > > *time locked until 2017-11-30T13:13:24Z* opts into full replace-by-fee > in 0[] > PUSHDATA(71)[3044022010ca112bda04e2716329b6da4dc1b2dabc46b560aab191614a972c5b19ecfba70220354a432315a5f93503f74228921c3c446c7dd873f936142f6f006d9e2530b61401] > > PUSHDATA(71)[30440220097a40f45493c03c0536af19d390d240dc9d2321dba7d1dd7bc971e1f4c2547a02203316f94d4b1e214bb136186088890d9e9b1ec767b856a25db3c7d18b1269129701] > > 0.50 BTC > > outpoint:ab6bbd174658377eb2e8315b67b0d0f0efe7b3e11d50b9f7a97465e184726325:0 > sequence:0, opts into full RBF > out > PUSHDATA(33)[03540700c0d260f123921b34f6b2d8d75e3582f3fc017bd53239f2546ac01f299a] > > CHECKSIG 0.498 BTC > fee 0.00833333 BTC/kB, 0.002 BTC for 240 bytes > prps UNKNOWN > > I wait more than 2 minutes and I try to broadcast the Tx, but I get the > following error: > > java.util.concurrent.ExecutionException: > org.bitcoinj.core.RejectedTransactionException: Reject: tx > fba9b3ec578c3be4bf159eb3d22f6503452689fc80d96d9488ebeaabf3a9cdbd for reason > 'non-final' (64) > at > com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299) > at > com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286) > at > com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116) > at WalletManager.broadcastTx(WalletManager.java:84) > at User.broadcastTxSecurity(User.java:157) > at MainUser.broadcastTxSecurity(MainUser.java:157) > at MainUser.menu(MainUser.java:88) > at MainUser.main(MainUser.java:34) > Caused by: org.bitcoinj.core.RejectedTransactionException: Reject: tx > fba9b3ec578c3be4bf159eb3d22f6503452689fc80d96d9488ebeaabf3a9cdbd for reason > 'non-final' (64) > at > org.bitcoinj.core.TransactionBroadcast$2.onPreMessageReceived(TransactionBroadcast.java:102) > at org.bitcoinj.core.Peer.processMessage(Peer.java:461) > at > org.bitcoinj.core.PeerSocketHandler.receiveBytes(PeerSocketHandler.java:182) > at > org.bitcoinj.net.ConnectionHandler.handleKey(ConnectionHandler.java:223) > at > org.bitcoinj.net.NioClientManager.handleKey(NioClientManager.java:86) > at org.bitcoinj.net.NioClientManager.run(NioClientManager.java:122) > at > com.google.common.util.concurrent.AbstractExecutionThreadService$1$2.run(AbstractExecutionThreadService.java:60) > at com.google.common.util.concurrent.Callables$3.run(Callables.java:95) > at > org.bitcoinj.utils.ContextPropagatingThreadFactory$1.run(ContextPropagatingThreadFactory.java:49) > > > Doing the same without locktime, then I can broadcast the Tx without > problems. > > Any clue of what could be happening? > > Kind regards. > -- 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.
