I've got a bitcoin address A with its relative encrypted key K stored in a persistence storage. I am launching bitcoinj through the WalletAppKit class and calling awaitRunning to wait for the blockchain header being downloaded. I am adding the key pair (A,K) to the wallet after decrypting the key. I am using the hex of an unspent transaction from the address A and using it as an input for a new transaction with an address B as output. I am trying to propagate the newly created transaction to the network but i get "Unknown confidence level" message also if the input transaction has many confirmations.
I think the spv blockchain has to be synced after adding address A but i don't understand how to do it.