Knowing if a public address is spendable by an HD seed? I want to know if an address is spendable by an HD seed and for that purpose I am using the following command:

&gt; bitcoin-cli getaddressinfo 3LFc64RRd96ejjYvm14KaogBF9fmeNmePW | jq '.solvable'
false


However as mentioned here and here it's impossible to know with 100% certainty that an HD seed can't spend from a certain address as one would need to generate infinite addresses. To counterbalance that I discovered a command that increases the 'search space':

&gt; bitcoin-cli keypoolrefill 1000


However, I am not sure getaddressinfo is sentitive to this keypoolinfo parameter or is just checking the addresses so far generated (the ones that can be obtained via bitcoin-cli listreceivedbyaddress 0 true). I could test this with a second node but my other node might be using another seed to generate new addresses. Even though I used sethdseed, I see a different xpriv when dumping the wallet.
Trying to enumerate all private keys using Bitcoin Core's wallet is extremely inefficient. Furthermore, any address that you generate in Bitcoin Core will inherently come from a HD seed because Bitcoin Core is a HD wallet and uses a HD seed. You also aren't going to get any information for a HD address that is not part of your wallet.


  However, I am not sure getaddressinfo is sentitive to this keypoolinfo parameter or is just checking the addresses so far generated (the ones that can be obtained via bitcoin-cli listreceivedbyaddress 0 true).


It is "sensitive" to the keypool. When you add keys to the keypool, they are actually generated and saved to the wallet file along with some metadata. getaddressinfo looks up whatever metadata is available regardless of the associated key being in the keypool or not.


  I could test this with a second node but my other node might be using another seed to generate new addresses.


Unless you have explicitly set a specific seed, then it most definitely is. Otherwise that would be a security vulnerability and anyone could steal anyone else's coins if they all used the same seed.


  Even though I used sethdseed, I see a different xpriv when dumping the wallet.


You need to provide the seed of your first wallet. Otherwise it will generate a new random seed and use that.