finding a suitable reference node also works with non-connected nodes or empty databases
Merge pull request #47 from jexp/master

finding a suitable reference node also works with non-connected nodes or empty databases